Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[Docs] [HTTP] [Trusted proxies] Removed note about adding 127.0.0.1#3926
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Removed the note about the need to add 127.0.0.1 to the list of trusted Proxies when using Symfony's reversed Proxy.
Well have there been any changes to how subrequests get the client IP? If not, I think my change is still valid. See this SO answer:http://stackoverflow.com/a/16895859 |
I think it's missleading. The reverse proxy works perfectly fine without adding Edit: Replaced "from within an ESI-included fragment" with "from within a sub-request". |
@ureimers If you don't add your local reverse proxy to the list, the detection of the client IP or the fact that the request is secure will fail, as it will consider the request between the proxy and the app, not the request sent by the client to the proxy, and forwarded to your app |
@weaverryan this note should be kept (even though some apps may not be impacted if they forget it) |
@stof Thank you for the clarification, I got that. But could you then please have a look at the referenced Symfony issue? Because I don't think that it's consistent that the reverse proxie's |
I don't know exactly what's going on here, but I trust@stof, so I'm closing this issue. However, feel free to keep commenting on it, we can always reopen it! |
Removed the note about the need to add 127.0.0.1 to the list of trusted proxies when using Symfony's reversed proxy.
I don't think that adding
127.0.0.1
to the list of trusted proxies is needed. The only place where Symfony uses the list of trusted proxies is in theFragmentListener
(https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php#L81) and there they are merged with the result ofFragmentListener#getLocalIpAddresses()
(https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php#L96) which already returns127.0.0.1
among the list of locally (and thus trusted) ips.