Skip to content

Node.js based forum software built for the modern web

fix: do not overwrite `config.port` from URL, if it's already set

ahwayakchih34096b73ef26
diff --git a/src/install.js b/src/install.js
index 36843d1881..4b22bc4037 100644
--- a/src/install.js
+++ b/src/install.js
@@ -175,7 +175,7 @@ async function completeConfigSetup(config) {
config.url = `http://${config.url}`;
}
const urlObj = url.parse(config.url);
- if (urlObj.port) {
+ if (urlObj.port && (!install.values || !install.values.hasOwnProperty('port'))) {
config.port = urlObj.port;
}