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

Set the x-forwarded-host flag when xfwd is enabled #967

Merged
merged 1 commit into from
Feb 26, 2016

Conversation

jbacklund
Copy link
Contributor

Reasoning: Rack's request class makes use of this HTTP header. Certain edge-case scenarios (proxying from ember-cli to a Rails backend) can be problematic without this header being present.

/cc @perlun, @jesjos

Reasoning: Rack's request class [makes use of](https://github.com/rack/rack/blob/master/lib/rack/request.rb#L243) this HTTP header. Certain edge-case scenarios (proxying from ember-cli to a Rails backend) can be problematic without this header being present.

/cc @perlun, @jesjos
@jcrugzz
Copy link
Contributor

jcrugzz commented Feb 26, 2016

Seems reasonable.

jcrugzz added a commit that referenced this pull request Feb 26, 2016
Set the x-forwarded-host flag when xfwd is enabled
@jcrugzz jcrugzz merged commit c1440b5 into http-party:master Feb 26, 2016
@chimurai
Copy link
Contributor

@jbacklund @jcrugzz

With this change, the xfwd behavior for web is slightly different from ws.

https://github.com/nodejitsu/node-http-proxy/blob/master/lib/http-proxy/passes/web-incoming.js#L65-L83
https://github.com/nodejitsu/node-http-proxy/blob/master/lib/http-proxy/passes/ws-incoming.js#L54-L69

Would be good to keep the API consistent; By applying the same change to WebSockets as well, instead of just the Web part.

@perlun
Copy link

perlun commented Mar 7, 2016

Agree, we should fix that as well. Care to submit a PR?

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.

None yet

4 participants