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
23
23
This is no problem, but you *do * need to tell Symfony what is happening
24
24
and which reverse proxy IP addresses will be doing this type of thing:
25
25
26
- .. configuration -block ::
26
+ .. code -block :: php
27
27
28
- .. code-block :: diff
28
+ // web/app.php
29
29
30
- // web/app.php
30
+ // ...
31
+ $request = Request::createFromGlobals();
31
32
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']);
35
36
36
- // ...
37
+ // ...
37
38
38
39
In this example, you're saying that your reverse proxy (or proxies) has
39
40
the 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