Skip to content

Commit 6bebb77

Browse files
committed
Reworded
1 parent 9891ccd commit 6bebb77

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

deployment/proxies.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ and what headers your reverse proxy uses to send information::
3131

3232
// tell Symfony about your reverse proxy
3333
Request::setTrustedProxies(
34-
// you can use IP address, IP address ranges or the 'REMOTE_ADDR' string,
35-
// which is replaced at run time by the $_SERVER['REMOTE_ADDR'] env var
36-
['192.0.0.1', '10.0.0.0/8', 'REMOTE_ADDR'],
34+
// the IP address (or range) of your proxy
35+
['192.0.0.1', '10.0.0.0/8'],
3736

3837
// trust *all* "X-Forwarded-*" headers
3938
Request::HEADER_X_FORWARDED_ALL
@@ -45,10 +44,6 @@ and what headers your reverse proxy uses to send information::
4544
// Request::HEADER_X_FORWARDED_AWS_ELB
4645
);
4746

48-
.. versionadded:: 4.4
49-
50-
The support for the ``REMOTE_ADDR`` env var was introduced in Symfony 4.4.
51-
5247
The Request object has several ``Request::HEADER_*`` constants that control exactly
5348
*which* headers from your reverse proxy are trusted. The argument is a bit field,
5449
so you can also pass your own value (e.g. ``0b00110``).
@@ -71,7 +66,7 @@ In this case, you'll need to - *very carefully* - trust *all* proxies.
7166
// ...
7267
Request::setTrustedProxies(
7368
// trust *all* requests (the 'REMOTE_ADDR' string is replaced at
74-
// run time by the $_SERVER['REMOTE_ADDR'] env var)
69+
// run time by $_SERVER['REMOTE_ADDR'])
7570
['127.0.0.1', 'REMOTE_ADDR'],
7671

7772
// if you're using ELB, otherwise use a constant from above
@@ -80,7 +75,7 @@ In this case, you'll need to - *very carefully* - trust *all* proxies.
8075

8176
.. versionadded:: 4.4
8277

83-
The support for the ``REMOTE_ADDR`` env var was introduced in Symfony 4.4.
78+
The support for the ``REMOTE_ADDR`` option was introduced in Symfony 4.4.
8479

8580
That's it! It's critical that you prevent traffic from all non-trusted sources.
8681
If you allow outside traffic, they could "spoof" their true IP address and

0 commit comments

Comments
 (0)