mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
Fixed #3925
Also updated port local variable to be a Number, since all of the conditional checks assume it is a number, when all along it has been a string.... heh.
This commit is contained in:
@@ -121,7 +121,7 @@ function cacheStaticFiles(callback) {
|
||||
}
|
||||
|
||||
function listen(callback) {
|
||||
var port = nconf.get('port');
|
||||
var port = parseInt(nconf.get('port'), 10);
|
||||
|
||||
if (Array.isArray(port)) {
|
||||
if (!port.length) {
|
||||
@@ -138,7 +138,7 @@ function listen(callback) {
|
||||
}
|
||||
}
|
||||
|
||||
if (port !== 80 && port !== 443 && nconf.get('use_port') === false) {
|
||||
if ((port !== 80 && port !== 443) || nconf.get('trust_proxy') === true) {
|
||||
winston.info('Enabling \'trust proxy\'');
|
||||
app.enable('trust proxy');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user