From ccecb27bc1b6bef3899f7ae4e6107cbea3ea12b6 Mon Sep 17 00:00:00 2001 From: Pushpak Chhajed Date: Mon, 9 Dec 2024 22:48:00 +0530 Subject: [PATCH] fix: configured trusted proxy --- bootstrap/app.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 33d3624..6ae160a 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -8,11 +8,12 @@ use Illuminate\Foundation\Configuration\Exceptions; use Illuminate\Foundation\Configuration\Middleware; use Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets; +use Illuminate\Http\Request; return Application::configure(basePath: dirname(__DIR__)) ->withRouting( - web: __DIR__.'/../routes/web.php', - api: __DIR__.'/../routes/api.php', + web: __DIR__ . '/../routes/web.php', + api: __DIR__ . '/../routes/api.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware): void { @@ -24,6 +25,7 @@ 'stripe/*', 'prism/*', ]); + $middleware->trustProxies(at: '*'); }) ->withExceptions(function (Exceptions $exceptions): void { Integration::handles($exceptions); // Intgrate Sentry with Application