Skip to content

Support for chaning the HTTP and HTTPS port that hosts will listen on #4127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ups, forgot eslint
  • Loading branch information
snordmann committed Oct 31, 2024
commit c377db5d62dd110697d3834c21a05a7432d28be6
14 changes: 7 additions & 7 deletions backend/internal/nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ const error = require('../lib/error');
* @returns {int} port
*/
const validatePort = (user_port, default_port) => {
if (user_port === NaN || user_port < 1 || user_port > 65535) {
if (isNaN(user_port) || user_port < 1 || user_port > 65535) {
console.error(`Environment variable HTTP_PORT must be an integer between 1 and 65535 (got: ${user_port}). Using default port ${default_port}`);
return default_port;
}
return user_port;
}
};

const internalNginx = {

Expand Down Expand Up @@ -246,9 +246,9 @@ const internalNginx = {
locationsPromise = Promise.resolve();
}

// Set the IPv6 setting for the host
host.ipv6 = internalNginx.ipv6Enabled();
host.http_port = internalNginx.httpPort();
// Set the IPv6 and port setting for the host
host.ipv6 = internalNginx.ipv6Enabled();
host.http_port = internalNginx.httpPort();
host.https_port = internalNginx.httpsPort();

locationsPromise.then(() => {
Expand Down Expand Up @@ -303,8 +303,8 @@ const internalNginx = {
return;
}

certificate.ipv6 = internalNginx.ipv6Enabled();
certificate.http_port = internalNginx.httpPort();
certificate.ipv6 = internalNginx.ipv6Enabled();
certificate.http_port = internalNginx.httpPort();
certificate.https_port = internalNginx.httpsPort();

renderEngine
Expand Down