-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Allow to configure trusted proxies and headers using config options #13964
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
looks good to me 👍 |
I've updated this with XML and PHP config. @xabbuh in the XSD file of these new options (https://github.com/symfony/symfony/pull/37357/files#diff-e7427ecf018e4434c1645712ebe715f6) they are defined as "strings". Is this correct? How can I use a PHP constant as part of a string in XML config? Thanks! |
I think you are right and we need to remove the constant examples from the XML code block. |
deployment/proxies.rst
Outdated
The feature to configure trusted proxies and headers with ``trusted_proxies`` | ||
and ``trusted_headers`` options was introduced in Symfony 5.2. In earlier | ||
Symfony versions you needed to use the ``Request::setTrustedProxies()`` | ||
method in the ``public/index.php``file. |
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.
method in the ``public/index.php``file. | |
method in the ``public/index.php`` file. |
Would be nice to have this somewhen merged. I wasted some time investigating that |
Thank you Javier! I'm very sorry, I somehow got 3 separate conflicts and ended up with a commit that someone assigned me as author instead of you. |
@wouterj no worries 🙏 Thanks for merging! |
Wow, that was fast. Thanks to all involved 👍 |
Fixes #13890.
If you agree with this, I'll add the XML and PHP config formats to the example.