Add trusted proxy config to framework configuration#1012
Merged
2 commits merged intomainfrom Aug 10, 2024
Merged
Conversation
Member
BentiGorlich
left a comment
There was a problem hiding this comment.
Should the docker config have a blank TRUSTED_PROXIES? Or do we need a default here? The www container is forwarding requests to the php container isn't it?
Author
Good point, we just need to swap the lines commented for docker. The container ips should fall within the private ranges I included. |
BentiGorlich
approved these changes
Aug 10, 2024
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The framework was not being configured with
TRUSTED_PROXIES, I've added this configuration and.envvariable to properly get the users actual IP as passed in thex-forwarded-forheader, this should also resolve any rate limiter issues we could see if running behind a reverse proxy as$request->getClientIp()will return thex-forwarded-forIP if configured correctly.https://symfony.com/doc/current/deployment/proxies.html#solution-settrustedproxies