Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x-forwarded-host overwrite for mutli level proxies #1267

wants to merge 1 commit into
base: master


None yet
2 participants
Copy link

jaggernoth commented May 23, 2018

Let's consider a scenario
proxy (Internet-facing) -> proxy(load balancer) -> application where both proxies will be based on node-http-proxy, with current logic original host to be lost
With updated logic the original forwarded host will be passed down the proxy chain

Marcin Paciulan
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

jcrugzz approved these changes Jun 6, 2018

Copy link

jcrugzz left a comment



This comment has been minimized.

Copy link

jcrugzz commented Jun 6, 2018

@jaggernoth host is probably most important but should we also default the other values so we are consistent?


This comment has been minimized.

Copy link

jaggernoth commented Jun 11, 2018

@jcrugzz : From what I can see in the code for other x-forwarded header entries new levels are concatenated as CSV values and I was considering making x-forwarded-host a CSV value as well but it would be much riskier as it may cause compatibility issues (CSV requires additional parsing).
AFAIK there is no real consensus on how the mechanism should work, but bare in mind I've done very minimal research just to make my code work;).
One thing is certain: just overwriting the host seems to defeat the purpose of this header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.