-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
xabbuh
commented
Dec 7, 2023
Q | A |
---|---|
Branch? | 7.1 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Issues | Fix #51826 |
License | MIT |
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 |
sounds reasonable to me, I have changed the code accordingly |
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
Outdated
Show resolved
Hide resolved
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 | MIT Let's save some memory allocations and callbacks when we can. Tweaks #33574 and #52924 Commits ------- 6bd4b4a [HttpFoundation] Add `PRIVATE_SUBNETS` as a shortcut for private IP address ranges to `Request::setTrustedProxies()`