From 4616582cd102739c3c715078d32c4914b73f6309 Mon Sep 17 00:00:00 2001 From: Brian Rogers Date: Fri, 9 Jan 2026 18:16:21 -0700 Subject: [PATCH] try not to use sessions, they aren't needed --- bootstrap/app.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bootstrap/app.php b/bootstrap/app.php index f382dc6..057732f 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -18,6 +18,14 @@ return Application::configure(basePath: dirname(__DIR__)) HandleInertiaRequests::class, AddLinkHeadersForPreloadedAssets::class, ]); + + // Ensure API routes are stateless (no sessions/cookies) + $middleware->api(remove: [ + \Illuminate\Cookie\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + ]); }) ->withExceptions(function (Exceptions $exceptions): void { //