Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3632c08

Browse files
xabbuhweaverryan
authored andcommitted
replace diff code block with PHP code block
1 parent1825c83 commit3632c08

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎request/load_balancer_reverse_proxy.rst‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@ Solution: trusted_proxies
2323
This is no problem, but you *do* need to tell Symfony what is happening
2424
and 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
3940
the IP address ``192.0.0.1`` or matches the range of IP addresses that use

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp