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 ---