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:
Julian Lam
2015-12-04 08:31:09 -05:00
parent 721649bff9
commit f77f39e937

View File

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