From 0a66d92d3120a801a30451f540342cf87357ac8c Mon Sep 17 00:00:00 2001 From: Sam Rolfe Date: Mon, 10 Aug 2026 16:00:02 +1000 Subject: [PATCH] =?UTF-8?q?FIX=20(root=20cause):=20trust=20Caddy=20proxies?= =?UTF-8?q?=20in=20bootstrap/app.php=20=E2=80=94=20Laravel=20saw=20http=20?= =?UTF-8?q?behind=20Caddy,=20so=20signed=20upload=20URLs=20never=20validat?= =?UTF-8?q?ed=20->=20every=20Livewire=20upload=20401=20->=20'failed=20to?= =?UTF-8?q?=20upload'=20regardless=20of=20file=20size.=20Verified:=20uploa?= =?UTF-8?q?d=20returns=20200=20with=20temp=20path.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/app/bootstrap/app.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/app/bootstrap/app.php b/admin/app/bootstrap/app.php index 7a2848f..abe4007 100644 --- a/admin/app/bootstrap/app.php +++ b/admin/app/bootstrap/app.php @@ -12,7 +12,9 @@ return Application::configure(basePath: dirname(__DIR__)) health: '/up', ) ->withMiddleware(function (Middleware $middleware): void { - // + // Caddy terminates TLS; trust its forwarded headers so Laravel sees + // https. REQUIRED for signed URLs (Livewire uploads) to validate. + $middleware->trustProxies(at: '*'); }) ->withExceptions(function (Exceptions $exceptions): void { $exceptions->shouldRenderJsonWhen(