Skip to content

node-http-proxy ignores incoming x-forward-for #143

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

Closed
tpetry opened this issue Nov 3, 2011 · 6 comments
Closed

node-http-proxy ignores incoming x-forward-for #143

tpetry opened this issue Nov 3, 2011 · 6 comments

Comments

@tpetry
Copy link

tpetry commented Nov 3, 2011

When you build your architecture that node-http-proxy is another proxy in a proxy chain it will ignore the incoming x-forward-for details and set it's own.

Architecture (all on the same server):

[nginx] -> [node-http-proxy] -> [node application]

Expected x-forward-for at node application:

[client-ip], [nginx-ip], [node-http-proxy-ip]

Actual x-forward-for at node application:

[node-http-proxy-ip]

It does not only throw away the x-forward-for information, it even does not pass the proxy-ip in the x-forward-for chain.

@dominictarr
Copy link
Contributor

that definitely sounds more correct.
can you link to an RFC on this or anything?

what x-forward-for does nginx write?

@tpetry
Copy link
Author

tpetry commented Nov 4, 2011

x-forward-for is a non rfc header, but wikipedia has a very nice article for it. Nginx complies to the description of this article.

@dominictarr
Copy link
Contributor

thanks. I'm gonna do some work on the tests soon, I'll stick this in after that.

@samyakbhuta
Copy link
Contributor

+1 for this issue.

@samyakbhuta
Copy link
Contributor

Please accept the pull request #163.

@AvianFlu
Copy link
Contributor

AvianFlu commented Dec 8, 2011

#163 has been merged; closing issue.

@AvianFlu AvianFlu closed this as completed Dec 8, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants