fixed problem creating x-forwarded headers

This commit is contained in:
tigerbot 2017-06-01 11:46:28 -06:00
parent be1a60d2e7
commit dda3dffb17
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ module.exports.create = function (deps, conf, greenlockMiddleware) {
if (conf.http.trustProxy && headers['x-forwarded-proto']) {
headLines.push('X-Forwarded-Proto: ' + headers['x-forwarded-proto']);
} else {
headLines.push('X-Forwarded-Proto: ' + conn.encrypted ? 'https' : 'http');
headLines.push('X-Forwarded-Proto: ' + (conn.encrypted ? 'https' : 'http'));
}
var proxyChain = (headers['x-forwarded-for'] || '').split(/ *, */).filter(Boolean);
proxyChain.push(opts.remoteAddress || opts.address || conn.remoteAddress);