Skip to content

Commit 196c3f0

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: Add note on Trusted Proxies config when app is behind multiple proxies
2 parents 019499e + 3a025f3 commit 196c3f0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

deployment/proxies.rst

+8
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ That's it! It's critical that you prevent traffic from all non-trusted sources.
7676
If you allow outside traffic, they could "spoof" their true IP address and
7777
other information.
7878

79+
If you are also using a reverse proxy on top of your load balancer (e.g.
80+
`CloudFront`_), calling ``$request->server->get('REMOTE_ADDR')`` won't be
81+
enough, as it will only trust the node sitting directly above your application
82+
(in this case your load balancer). You also need to append the IP addresses or
83+
ranges of any additional proxy (e.g. `CloudFront IP ranges`_) to the array of
84+
trusted proxies.
85+
7986
Custom Headers When Using a Reverse Proxy
8087
-----------------------------------------
8188

@@ -94,3 +101,4 @@ In this case, you'll need to set the header ``X-Forwarded-Proto`` with the value
94101

95102
.. _`security groups`: http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html
96103
.. _`CloudFront`: https://en.wikipedia.org/wiki/Amazon_CloudFront
104+
.. _`CloudFront IP ranges`: https://ip-ranges.amazonaws.com/ip-ranges.json

0 commit comments

Comments
 (0)