diff --git a/bootstrap/app.php b/bootstrap/app.php index c4fd8aff..f81b99fb 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -30,9 +30,10 @@ '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); + $middleware->trustProxies( + at: config('trustedproxies', []), + headers: Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PROTO + ); }) ->withExceptions(function (Exceptions $exceptions) { // diff --git a/config/trustedproxies.php b/config/trustedproxies.php new file mode 100644 index 00000000..bc289f00 --- /dev/null +++ b/config/trustedproxies.php @@ -0,0 +1,5 @@ +