From dda3dffb17df51d16878fe2c739ee64441bf3952 Mon Sep 17 00:00:00 2001 From: tigerbot Date: Thu, 1 Jun 2017 11:46:28 -0600 Subject: [PATCH] fixed problem creating x-forwarded headers --- lib/modules/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/http.js b/lib/modules/http.js index 39c099e..a6b5ea7 100644 --- a/lib/modules/http.js +++ b/lib/modules/http.js @@ -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);