fixed problem creating x-forwarded headers
This commit is contained in:
parent
be1a60d2e7
commit
dda3dffb17
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue