File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,18 @@ Solution: trusted_proxies
2323This is no problem, but you *do * need to tell Symfony what is happening
2424and which reverse proxy IP addresses will be doing this type of thing:
2525
26- .. configuration -block ::
26+ .. code -block :: php
2727
28- .. code-block :: diff
28+ // web/app.php
2929
30- // web/app.php
30+ // ...
31+ $request = Request::createFromGlobals();
3132
32- // ...
33- $request = Request::createFromGlobals();
34- + Request::setTrustedProxies(['127.0.0.1', '10.0.0.0/8']);
33+ // use the setTrustedProxies() method to tell Symfony
34+ // about your reverse proxy IP addresses
35+ Request::setTrustedProxies(['127.0.0.1', '10.0.0.0/8']);
3536
36- // ...
37+ // ...
3738
3839 In this example, you're saying that your reverse proxy (or proxies) has
3940the IP address ``192.0.0.1 `` or matches the range of IP addresses that use
You can’t perform that action at this time.
0 commit comments