fix(web): 欢迎页 - 修复 welcome 路由 403 与端口跳转
This commit is contained in:
10
nginx.conf
10
nginx.conf
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user