fix(deploy): root path redirect to admin (cn) — persisted in template+compose
用户约定:32005 根路径打开即管理后台。之前是直接改在服务器容器配置上的,
历次镜像重建被冲掉——本次固化进仓库:nginx 模板 location = / → 302
${ROOT_REDIRECT};Dockerfile 默认 /admin/;compose 按栈注入(cn=/admin/,
ov=/index.html 观众端安全自指,不影响 /a/<token> 与嵌入路径)。
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,14 @@ server {
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# 根路径直达(用户约定 2026-09-23:cn 入口 / 打开即管理后台)。
|
||||
# ROOT_REDIRECT 由 compose 按栈注入:cn=/admin/(进后台);ov=/index.html
|
||||
# (观众端安全自指,等价原 viewer 首页)。仅精确匹配 /,不影响 /a/<token>
|
||||
# 等 viewer 路由与嵌入路径。
|
||||
location = / {
|
||||
return 302 ${ROOT_REDIRECT};
|
||||
}
|
||||
|
||||
# viewer SPA history 路由回退。
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
||||
Reference in New Issue
Block a user