Skip to content

Commit cb994e0

Browse files
author
Marcin Paciulan
committed
x-forwarded-host overwrite for mutli level proxies
With more than 1 proxy the original host was lost, now it will be passed down the proxy chain
1 parent 42e8e1e commit cb994e0

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)