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.
v1.18.x
Julian Lam
parent 721649bff9
commit f77f39e937

@ -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');
}

Loading…
Cancel
Save