Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] add a private_ranges shortcut for trusted_proxies#52924
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
xabbuh commentedDec 7, 2023
| Q | A |
|---|---|
| Branch? | 7.1 |
| Bug fix? | no |
| New feature? | yes |
| Deprecations? | no |
| Issues | Fix#51826 |
| License | MIT |
danielburger1337 commentedDec 7, 2023
There are some scenarios where additional private IPs are used for reverse proxies. For example I know of multiple setups where the forwarded proxy is 127.0.0.1 (mainly Nginx -> Apache on the same machine without containerization). There is also the case of azure load balancer. I don't know if they still actively deploy this or not but at least they used to use a little known feature called IPv6 "IPv4 mapped addresses" Wouldn't it make sense to add this to the shortcut as well? And if yes, why not just use the |
xabbuh commentedDec 8, 2023
sounds reasonable to me, I have changed the code accordingly |
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, rebase needed
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedJan 2, 2024
Thank you@xabbuh. |
…or private IP address ranges to `Request::setTrustedProxies()` (nicolas-grekas)This PR was merged into the 7.2 branch.Discussion----------[HttpFoundation] Add `PRIVATE_SUBNETS` as a shortcut for private IP address ranges to `Request::setTrustedProxies()`| Q | A| ------------- | ---| Branch? | 7.2| Bug fix? | no| New feature? | no| Deprecations? | no| Issues | -| License | MITLet's save some memory allocations and callbacks when we can.Tweaks#33574 and#52924Commits-------6bd4b4a [HttpFoundation] Add `PRIVATE_SUBNETS` as a shortcut for private IP address ranges to `Request::setTrustedProxies()`