Skip to content

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

Merged
merged 1 commit into from
Dec 30, 2020

Conversation

javiereguiluz
Copy link
Member

Fixes #13890.

If you agree with this, I'll add the XML and PHP config formats to the example.

@javiereguiluz javiereguiluz added this to the 5.2 milestone Jul 13, 2020
@xabbuh
Copy link
Member

xabbuh commented Aug 3, 2020

looks good to me 👍

@javiereguiluz
Copy link
Member Author

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!

@xabbuh
Copy link
Member

xabbuh commented Sep 13, 2020

I think you are right and we need to remove the constant examples from the XML code block.

@xabbuh xabbuh changed the base branch from master to 5.x October 6, 2020 11:54
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
method in the ``public/index.php``file.
method in the ``public/index.php`` file.

@xabbuh xabbuh changed the base branch from 5.x to 5.2 November 17, 2020 10:06
@vstelmakh
Copy link
Contributor

vstelmakh commented Dec 30, 2020

Would be nice to have this somewhen merged. I wasted some time investigating that framework.trusted_proxies exist again. 🙂

@wouterj wouterj merged commit 09ab76b into symfony:5.2 Dec 30, 2020
@wouterj
Copy link
Member

wouterj commented Dec 30, 2020

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.

@javiereguiluz
Copy link
Member Author

@wouterj no worries 🙏 Thanks for merging!

@vstelmakh
Copy link
Contributor

Wow, that was fast. Thanks to all involved 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FrameworkBundle] allow configuring trusted proxies using semantic conf…
5 participants