Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #266 from rampr/master

Fix bug: x-forwarded-proto set incorrectly as httphttps or wswss
  • Loading branch information...
commit ccd8f840b25c9aa1f40cbcc966eaa751611a4ee3 2 parents 81f6095 + 0933f1c
@jfhbrook jfhbrook authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/node-http-proxy/http-proxy.js
View
4 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 {
Please sign in to comment.
Something went wrong with that request. Please try again.