修复Caddy将/api-debug误代理到后端导致404的问题

This commit is contained in:
yml2213
2026-07-30 20:30:41 +08:00
parent 5f409b397c
commit 34a9122849
+7
View File
@@ -6,6 +6,13 @@
skin.khhao.com { skin.khhao.com {
encode gzip zstd 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 # API 请求反向代理到后端服务 / Proxy API requests to backend
handle /api* { handle /api* {
reverse_proxy backend:8080 reverse_proxy backend:8080