update at 2026-02-11 18:27:51
This commit is contained in:
@@ -137,9 +137,10 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Web SPA 路由回退(刷新任意前端路径时返回 index.html)
|
# Web SPA 路由回退(刷新任意前端路径时返回 index.html)
|
||||||
# 不使用 $uri/,避免根路径 "/" 命中目录后触发 403。
|
# 为 Web 单独指定 root,避免 try_files 内部重定向循环导致 500。
|
||||||
location / {
|
location / {
|
||||||
try_files /frontend/dist$uri /frontend/dist/index.html;
|
root /Users/gavin/font2svg/frontend/dist;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# 禁止访问隐藏文件
|
# 禁止访问隐藏文件
|
||||||
|
|||||||
Reference in New Issue
Block a user