调整异常
This commit is contained in:
+3
-1
@@ -61,8 +61,10 @@ server {
|
||||
}
|
||||
|
||||
# SPA 路由 fallback:所有非文件请求回退到 index.html
|
||||
# 注意不能带 $uri/:dist 下存在与路由同名的静态资源目录(如 mod-assets/jieya-ibp),
|
||||
# 若命中目录(无 index.html)会返回 403 导致 SPA 路由失效
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
# 静态资源长缓存(Vite 构建产物带 hash)
|
||||
|
||||
Reference in New Issue
Block a user