Skip to content

Commit

Permalink
x-forwarded-host overwrite for mutli level proxies (#1267)
Browse files Browse the repository at this point in the history
With more than 1 proxy the original host was lost, now it will be passed down the proxy chain
  • Loading branch information
jaggernoth authored and indexzero committed Aug 22, 2019
1 parent 91fee3e commit 36bfe56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http-proxy/passes/web-incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = {
values[header];
});

req.headers['x-forwarded-host'] = req.headers['host'] || '';
req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers['host'] || '';
},

/**
Expand Down

0 comments on commit 36bfe56

Please # to comment.