-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[3.3] Finishing setTrustedProxies() changes & trusted_proxies removal #7952
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
_build/redirection_map
Outdated
@@ -336,3 +336,4 @@ | |||
/components/dependency_injection/autowiring /service_container/autowiring | |||
/event_dispatcher/class_extension /event_dispatcher | |||
/security/target_path /security | |||
/components/http_foundation/trusting_proxies /request/load_balancer_reverse_proxy |
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.
missing trailing newline
http_cache/varnish.rst
Outdated
:ref:`How to Configure Symfony to Work behind a Load Balancer or a Reverse Proxy <request-untrust-header>`. | ||
Remember to call the :ref:`Request::setTrustedProxies() <request-set-trusted-proxies>` | ||
method in your front controller so that Varnish is seen as a trusted proxy | ||
and the :ref:`X-Forwarded <varnish-x-forwarded-headers>` headers are used. |
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.
X-Forward-*
?
@@ -183,44 +182,13 @@ named ``kernel.http_method_override``. | |||
$request = Request::createFromGlobals(); | |||
// ... | |||
|
|||
|
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.
should be reverted
xsi:schemaLocation="http://symfony.com/schema/dic/services | ||
http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> | ||
// tell Symfony about your revers proxy |
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.
reverse
|
||
.. code-block:: php | ||
// or, if your proxy instead uses the "Forwarded" header | ||
// Request::HEADER_FORWARDED |
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.
we should also mention the HEADER_X_FORWARDED_AWS_ELB
constant
👍 just some minor comments |
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.
Ryan, thanks for taking care of this important update. I like it a lot!
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> | ||
// tell Symfony about your revers proxy | ||
Request::setTrustedProxies( | ||
// the ip address (or range) of your proxy |
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.
ip address
-> IP address
using HTTPS. | ||
The Request object has several ``Request::HEADER_*`` constants that control exactly | ||
*which* headers from your reverse proxy are trusted. The argument is a bit field, | ||
so you can also pass your own value (e.g. ``0b00110``). |
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.
I'm not sure about this part: ... so you can also pass your own value (e.g. 0b00110)
Don't you think that'd be super confusing and hard to maintain?
…roxies removal (JarJak, xabbuh, weaverryan) This PR was merged into the 3.3 branch. Discussion ---------- [3.3] Finishing setTrustedProxies() changes & trusted_proxies removal Finishes #7868 Commits ------- c7087bf tweaks thanks to review 45b419d Adding second argument to setTrustedProxies() and removing old information 2f83164 replace trusted_proxies reference 3632c08 replace diff code block with PHP code block 1825c83 Remove deprecated trusted_proxies config option df63034 Remove deprecated trusted_proxies config option
Finishes #7868 and closes #7671