Skip to content

Commit 928228a

Browse files
committed
Fix CheckForTrustedProxiesTest
1 parent 4c440e9 commit 928228a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Foundation/Http/Middleware/CheckForTrustedProxiesTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testUntrusted()
3434
public function testTrustedProxy()
3535
{
3636
$request = $this->createProxiedRequest();
37-
$request->setTrustedProxies(['173.174.200.38'], 'HEADER_X_FORWARDED_ALL');
37+
$request->setTrustedProxies(['173.174.200.38'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);
3838

3939
$this->assertEquals('192.168.10.10', $request->getClientIp());
4040
$this->assertEquals('https', $request->getScheme());
@@ -255,7 +255,7 @@ protected function createProxiedRequest(array $overrides = [])
255255
);
256256

257257
// Reset trusted proxies and headers
258-
$request->setTrustedProxies([], 'HEADER_X_FORWARDED_ALL');
258+
$request->setTrustedProxies([], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);
259259

260260
return $request;
261261
}

0 commit comments

Comments
 (0)