Skip to content

Commit

Permalink
feat: trust 10.0.0.0/8 by default for TrustProxies
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyker committed Nov 29, 2024
1 parent 2faf06e commit 97a0e63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Symfony\Component\HttpFoundation\Request;

return Application::configure(basePath: dirname(__DIR__))
->withRouting(
Expand All @@ -28,6 +29,10 @@
'solder_mods' => \App\Http\Middleware\SolderMods::class,
'solder_users' => \App\Http\Middleware\SolderUsers::class,
]);

$middleware->trustProxies(at: [
'10.0.0.0/8',
], headers: Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PROTO);
})
->withExceptions(function (Exceptions $exceptions) {
//
Expand Down

0 comments on commit 97a0e63

Please sign in to comment.