From 34a91228491b1bdd0e08b7e9bc7febbdcc6eb076 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Thu, 30 Jul 2026 20:30:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCaddy=E5=B0=86/api-debug?= =?UTF-8?q?=E8=AF=AF=E4=BB=A3=E7=90=86=E5=88=B0=E5=90=8E=E7=AB=AF=E5=AF=BC?= =?UTF-8?q?=E8=87=B4404=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caddyfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Caddyfile b/Caddyfile index 4a3de19..55f12a4 100644 --- a/Caddyfile +++ b/Caddyfile @@ -6,6 +6,13 @@ skin.khhao.com { encode gzip zstd + # /api-debug 是前端 SPA 路由,不要代理到后端 + handle /api-debug* { + root * /usr/share/caddy + try_files {path} {path}/ /index.html + file_server + } + # API 请求反向代理到后端服务 / Proxy API requests to backend handle /api* { reverse_proxy backend:8080