[GH-ISSUE #1767] Request: option to not modify X-Forwarded-For header #1397

Closed
opened 2026-05-05 12:53:09 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @delfer on GitHub (Apr 18, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1767

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!

Originally created by @delfer on GitHub (Apr 18, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1767 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!
Author
Owner

@fatedier commented on GitHub (Apr 19, 2020):

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.

<!-- gh-comment-id:616046901 --> @fatedier commented on GitHub (Apr 19, 2020): 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.
Author
Owner

@CzBiX commented on GitHub (Jul 21, 2020):

https://github.com/home-assistant/core/issues/29868

<!-- gh-comment-id:661922026 --> @CzBiX commented on GitHub (Jul 21, 2020): https://github.com/home-assistant/core/issues/29868
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1397
No description provided.