Skip to content

Commit 36bfe56

Browse files
jaggernothindexzero
authored andcommitted
x-forwarded-host overwrite for mutli level proxies (#1267)
With more than 1 proxy the original host was lost, now it will be passed down the proxy chain
1 parent 91fee3e commit 36bfe56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/http-proxy/passes/web-incoming.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = {
8282
values[header];
8383
});
8484

85-
req.headers['x-forwarded-host'] = req.headers['host'] || '';
85+
req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers['host'] || '';
8686
},
8787

8888
/**

0 commit comments

Comments
 (0)