FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

x-forwarded-host overwrite for mutli level proxies by jaggernoth · Pull Request #1267 · http-party/node-http-proxy · GitHub

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

Merged
indexzero merged 1 commit into
http-party:masterfrom
jaggernoth:master
Aug 22, 2019
Merged

x-forwarded-host overwrite for mutli level proxies#1267
indexzero merged 1 commit into
http-party:masterfrom
jaggernoth:master

Conversation

jaggernoth commented May 23, 2018
edited
Loading

Copy link
Copy Markdown
Contributor

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

With more than 1 proxy the original host was lost, now it will be passed down the proxy chain

jcrugzz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM 👍

jcrugzz commented Jun 6, 2018

Copy link
Copy Markdown
Contributor

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

jaggernoth commented Jun 11, 2018
edited
Loading

Copy link
Copy Markdown
Contributor Author

@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.

indexzero left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Agree with @jcrugzz comment, but this PR is still 👍

As to the CSV value question @jaggernoth the research I briefly looked at did not suggest that as a format:

indexzero merged commit 36bfe56 into http-party:master Aug 22, 2019
mcheshkov pushed a commit to gemini-testing/node-http-proxy that referenced this pull request Sep 16, 2019
With more than 1 proxy the original host was lost, now it will be passed down the proxy chain
This was referenced Mar 17, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL