From 3c98d77450507534ad15920f2c9be2876fb2c0f1 Mon Sep 17 00:00:00 2001 From: Jaggernoth Date: Thu, 22 Aug 2019 09:09:26 +0200 Subject: [PATCH] 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 --- lib/http-proxy/passes/web-incoming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http-proxy/passes/web-incoming.js b/lib/http-proxy/passes/web-incoming.js index 995a0db4d..781b32692 100644 --- a/lib/http-proxy/passes/web-incoming.js +++ b/lib/http-proxy/passes/web-incoming.js @@ -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'] || ''; }, /**