Skip to content

Commit

Permalink
Fix manually set headers in TrustProxies
Browse files Browse the repository at this point in the history
This can be reverted when upgrading to Laravel 10.

References: laravel/framework#47844
  • Loading branch information
mzur committed Aug 21, 2023
1 parent 430c4cb commit c39d59d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,16 @@ class TrustProxies extends Middleware
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;

/**
* Manual fix for: https://github.com/laravel/framework/pull/47844
*
* TODO: Remove after upgrading to Laravel 10.x.
*
* @return int
*/
protected function getTrustedHeaderNames()
{
return $this->headers;
}
}

0 comments on commit c39d59d

Please sign in to comment.