From 6ee58817ce77ef2c2b3b3f642eb168d11be2aa92 Mon Sep 17 00:00:00 2001 From: Ray1111-aa Date: Thu, 29 Oct 2026 11:07:44 +0700 Subject: [PATCH] fix(security): configure trustProxies for Cloudflare reverse proxy HTTPS support --- bootstrap/app.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap/app.php b/bootstrap/app.php index 72c436c..ed8ced1 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,6 +11,8 @@ return Application::configure(basePath: dirname(__DIR__)) health: '/up', ) ->withMiddleware(function (Middleware $middleware): void { + $middleware->trustProxies(at: '*'); + $middleware->alias([ 'role' => \App\Http\Middleware\CheckRole::class, 'permission' => \Spatie\Permission\Middleware\PermissionMiddleware::class,