From 7a773451f43d65ac065b2321b3088fbcd9eae092 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Sun, 21 Jun 2026 19:15:03 -0700 Subject: [PATCH] =?UTF-8?q?lith:=20fix=20/api/*=20405=20on=20jas/l5/proces?= =?UTF-8?q?sing=20subdomains=20=E2=80=94=20wrap=20static=20fallback=20in?= =?UTF-8?q?=20handle{}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same bare-try_files-ahead-of-handle bug as the give subdomain fix: POSTs to /api/* were rewritten to the SPA fallback and 405'd. Wrap each block's static fallback in handle{} so handle /api/* stays terminal. (papers has no /api route, left as-is.) --- lith/Caddyfile | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/lith/Caddyfile b/lith/Caddyfile index a96fbd444..f44ce47dd 100644 --- a/lith/Caddyfile +++ b/lith/Caddyfile @@ -217,9 +217,13 @@ } redir /bio /cv 301 redir /bio/ /cv 301 - root * /opt/ac/system/public/justanothersystem.org - try_files {path} {path}.html /index.html - file_server + # Static fallback wrapped in handle{} so handle /api/* stays terminal — + # bare try_files is reordered ahead of handle and 405s /api/* POSTs. + handle { + root * /opt/ac/system/public/justanothersystem.org + try_files {path} {path}.html /index.html + file_server + } } # --- builds.false.work --- @@ -451,9 +455,13 @@ handle /docs* { reverse_proxy localhost:8888 } - root * /opt/ac/system/public/l5.aesthetic.computer - try_files {path} {path}.html /index.html - file_server + # Static fallback wrapped in handle{} so handle /api/* stays terminal — + # bare try_files is reordered ahead of handle and 405s /api/* POSTs. + handle { + root * /opt/ac/system/public/l5.aesthetic.computer + try_files {path} {path}.html /index.html + file_server + } } # --- processing.aesthetic.computer --- @@ -465,9 +473,13 @@ handle /docs* { reverse_proxy localhost:8888 } - root * /opt/ac/system/public/processing.aesthetic.computer - try_files {path} {path}.html /index.html - file_server + # Static fallback wrapped in handle{} so handle /api/* stays terminal — + # bare try_files is reordered ahead of handle and 405s /api/* POSTs. + handle { + root * /opt/ac/system/public/processing.aesthetic.computer + try_files {path} {path}.html /index.html + file_server + } } # --- rdp.jas.life --- -- 2.51.2