diff --git a/lib/node-http-proxy/http-proxy.js b/lib/node-http-proxy/http-proxy.js index e4f4ae611..3306defcc 100644 --- a/lib/node-http-proxy/http-proxy.js +++ b/lib/node-http-proxy/http-proxy.js @@ -148,7 +148,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) { } if (req.headers['x-forwarded-proto']){ - var protoToAppend = "," + (req.connection.pair) ? 'https' : 'http'; + var protoToAppend = "," + (req.connection.pair ? 'https' : 'http'); req.headers['x-forwarded-proto'] += protoToAppend; } else { @@ -415,7 +415,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer) } if (req.headers['x-forwarded-proto']){ - var protoToAppend = "," + (req.connection.pair) ? 'wss' : 'ws'; + var protoToAppend = "," + (req.connection.pair ? 'wss' : 'ws'); req.headers['x-forwarded-proto'] += protoToAppend; } else {