Skip to content

Commit c39d59d

Browse files
committedAug 21, 2023
Fix manually set headers in TrustProxies
This can be reverted when upgrading to Laravel 10. References: laravel/framework#47844
1 parent 430c4cb commit c39d59d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎app/Http/Middleware/TrustProxies.php

+12
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,16 @@ class TrustProxies extends Middleware
2525
Request::HEADER_X_FORWARDED_PORT |
2626
Request::HEADER_X_FORWARDED_PROTO |
2727
Request::HEADER_X_FORWARDED_AWS_ELB;
28+
29+
/**
30+
* Manual fix for: https://github.com/laravel/framework/pull/47844
31+
*
32+
* TODO: Remove after upgrading to Laravel 10.x.
33+
*
34+
* @return int
35+
*/
36+
protected function getTrustedHeaderNames()
37+
{
38+
return $this->headers;
39+
}
2840
}

0 commit comments

Comments
 (0)