fix(deploy): 线上路由 - 修复 canvas 访问跳转到容器端口
This commit is contained in:
1 parent
298b5ebf1f
commit
03053c356e
2 files changed
+11
No files matched your search
+10
@@ -108,6 +108,16 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# /canvas 同时是 React 路由和静态模型资源目录;精确命中路由时必须优先回退到 SPA,
|
||||
# 否则 try_files 会把它当作目录并生成带容器端口的 301。
|
||||
location = /canvas {
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
location = /canvas/ {
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user