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

Support Forwarded and X-Forwarded-For headers #10

Closed
magiconair opened this issue Nov 1, 2015 · 0 comments
Closed

Support Forwarded and X-Forwarded-For headers #10

magiconair opened this issue Nov 1, 2015 · 0 comments

Comments

@magiconair
Copy link
Contributor

fabio currently supports only a simple version of the X-Forwarded-For headers which only contains the remote ip address. The X-Forwarded-For header and the newer Forwarded header have more complex formats and also require the detection of the local ip address.

I think it should be changed as follows:

When the proxy.header.clientip header value is set to X-Forwarded-For then it should behave like it, i.e. set it to <remote ip>, <local ip> if not set or add , <local ip> if already set.

In addition the Forwarded header should be honored every time, i.e. set it if it hasn't been set or augment it if was already set.

I'm still thinking whether a force option is necessary to prevent spoofing the remote ip.

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

1 participant