Skip to content

Commit

Permalink
Enable TrustProxies middleware for private ranges to allow Laravel to…
Browse files Browse the repository at this point in the history
… see the real client IP
  • Loading branch information
PatBriPerso committed Sep 25, 2024
1 parent a2e9def commit 805ca4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ class TrustProxies extends Middleware
*
* @var array
*/
protected $proxies;
protected $proxies = [
'10.0.0.0/8',
'172.16.0.0/12',
'192.168.0.0/16',
];

/**
* The current proxy header mappings.
Expand Down

0 comments on commit 805ca4e

Please sign in to comment.