fix(web): 欢迎页 - 修复 welcome 路由 403 与端口跳转

This commit is contained in:
ddCat
2026-09-11 14:32:31 +08:00
parent 7881680af8
commit 76b646b208

View File

@@ -144,6 +144,16 @@ server {
try_files /index.html =404;
}
# /welcome 是 React 路由,同时也是欢迎页静态素材目录;精确命中路由时优先回退到 SPA,
# 避免 Nginx 把目录当作文件列表并返回 403,或生成带容器端口的 301。
location = /welcome {
try_files /index.html =404;
}
location = /welcome/ {
try_files /index.html =404;
}
location / {
try_files $uri $uri/ /index.html;
}