Skip to content

Commit 93f40fe

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Create Framework] Fix a call to setTrustedProxies()
2 parents 28070e8 + 00f2240 commit 93f40fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

create_framework/http_foundation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ code in production without a proxy, it becomes trivially easy to abuse your
255255
system. That's not the case with the ``getClientIp()`` method as you must
256256
explicitly trust your reverse proxies by calling ``setTrustedProxies()``::
257257

258-
Request::setTrustedProxies(['10.0.0.1']);
258+
Request::setTrustedProxies(['10.0.0.1'], Request::HEADER_X_FORWARDED_FOR);
259259

260260
if ($myIp === $request->getClientIp()) {
261261
// the client is a known one, so give it some more privilege

0 commit comments

Comments
 (0)