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

Request: option to not modify X-Forwarded-For header #1767

Closed
delfer opened this issue Apr 18, 2020 · 2 comments
Closed

Request: option to not modify X-Forwarded-For header #1767

delfer opened this issue Apr 18, 2020 · 2 comments

Comments

@delfer
Copy link

delfer commented Apr 18, 2020

Hello!

@fatedier Thank you very much for this beautiful software!!!
I'm using a reverse proxy (https://github.com/containous/traefik) in the front of FRPS and header X-Forwarded-For is already set.
But FRPS always adds a new entry into the list at https://github.com/fatedier/frp/blob/master/utils/vhost/reverseproxy.go#L248
And I have this:

X-Forwarded-For: 3.95.2.106, 127.0.0.1

But my endpoint server (https://github.com/home-assistant/core) does not recognize the list in this header.

Please, add an option to leave X-Forwarded-For header as-is. Thank you!

@fatedier
Copy link
Owner

I'm confused why https://github.com/home-assistant/core can't support this format?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For

X-Forwarded-For: <client>, <proxy1>, <proxy2>

ReverseProxy codes are copied from go standard library. I prefer not to modify it.

Maybe you can create an issue of https://github.com/home-assistant/core to solve this problem.

@CzBiX
Copy link

CzBiX commented Jul 21, 2020

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

No branches or pull requests

3 participants