feat(deploy): 老管理台 sso.html 单页集成(v0.7.9)
精简版之前少了 /legacy/sso.html(身份/OAuth/同步/会话/指南
5 tab 入口都在里面),sso 插件 UMD 硬编码指它,精简版 nginx
无该 location → 5 tab 全 404。修补:
- deploy/legacy/sso.html 从 ipass-all 复制(自包含,76KB,
零外部 css/js 资产,fetch 全走 /api/admin/* 绝对路径)
- Dockerfile 加 COPY deploy/legacy/ /usr/local/nginx/legacy/
- nginx.conf 加 location /legacy/ { alias ...; } 静态段
- gateway Merge 不再继承父 location / 的 api=true,
否则 ipass_api on 的 catch-all 会让 /legacy/ 被 dispatch
接管返回 {"code":404,"msg":"接口不存在"}
- v0.7.5/v0.7.6/v0.7.7/v0.7.8 是这条链上的 debug 迭代,
v0.7.9 是清掉 debug log 后的发布版
This commit is contained in:
1 parent
51758e53e8
commit
534632e1a8
5 files changed
+1583
-7
No files matched your search
+3
-1
@@ -93,7 +93,9 @@ COPY deploy/nginx.conf /usr/local/nginx/conf/nginx.conf
|
||||
COPY deploy/shell/ /usr/local/nginx/www/
|
||||
COPY deploy/static-plugins/ /usr/local/nginx/static-plugins/
|
||||
# 装配层自定义页清单(精简版不挂自定义页,无 deploy/custom/)
|
||||
# 老管理台多页应用(精简版不集成老管理台,无 deploy/legacy/)
|
||||
# 老管理台 sso 五 tab 单页(精简版只搬这一页,sso 插件 UMD 的 5 个 tab 全指它;
|
||||
# 全自包含 inline css+js,零外部资产,nginx 走 /legacy/ 静态段)
|
||||
COPY deploy/legacy/ /usr/local/nginx/legacy/
|
||||
|
||||
# 种子数据(admin/alice + OAuth 接入方 + 插件启停注册表)
|
||||
COPY data-seed/ /usr/local/nginx/data-seed/
|
||||
|
||||
@@ -42,7 +42,7 @@ spec:
|
||||
# 之后业务写盘才炸,最难查)。幂等,每次滚动都会跑。
|
||||
initContainers:
|
||||
- name: init-data-dir
|
||||
image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/nginx:ipass-sso-v0.7.3
|
||||
image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/nginx:ipass-sso-v0.7.9
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["bash", "-c", "mkdir -p /persist/sso && ls -la /persist"]
|
||||
securityContext:
|
||||
@@ -54,7 +54,7 @@ spec:
|
||||
mountPath: /persist
|
||||
containers:
|
||||
- name: ipass-sso
|
||||
image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/nginx:ipass-sso-v0.7.3
|
||||
image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/nginx:ipass-sso-v0.7.9
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+7
-1
@@ -138,7 +138,13 @@ http {
|
||||
add_header Cache-Control "no-store" always;
|
||||
}
|
||||
# 装配层自定义页清单(精简版不挂自定义页,无 /static/custom/)
|
||||
# 老管理台多页应用(精简版不集成老管理台,无 /legacy/)
|
||||
# 老管理台 sso 五 tab 单页(精简版只挂 sso.html 一张;自包含,零外部资产)
|
||||
# 默认 api=false 即可:merge_loc_conf 已不继承父 location / 的 ipass_api on
|
||||
# (见 gateway/src/lib.rs::Merge 注释),无需显式 `ipass_api off;`
|
||||
location /legacy/ {
|
||||
alias /usr/local/nginx/legacy/;
|
||||
add_header Cache-Control "no-store" always;
|
||||
}
|
||||
|
||||
# ---- 企微域名校验文件(v0.7.0+)----
|
||||
# 文件在 PVC 的 verify/ 目录(/usr/local/nginx/data/verify/WW_verify_*.txt),
|
||||
|
||||
@@ -172,9 +172,12 @@ unsafe impl HttpModuleLocationConf for Module {
|
||||
|
||||
impl Merge for ModuleConfig {
|
||||
fn merge(&mut self, prev: &ModuleConfig) -> Result<(), MergeConfigError> {
|
||||
if prev.api {
|
||||
self.api = true;
|
||||
}
|
||||
// ⚠️ 不从父 location 继承 api:父 location / { ipass_api on; } 会让同 server
|
||||
// 的所有兄弟 location(/admin/ /plugin- /manage/ /assets/ /static/plugins/ /legacy/
|
||||
// 等静态段)被强制接管,dispatch 抢回 {"code":404,"msg":"接口不存在"}。
|
||||
// 想要 API 兜底的子 location 必须显式 `ipass_api on;`(/api/ 与 / 已经显式开了)。
|
||||
// iap 仍按父继承:access 阶段的身份门禁按 server 级默认更符合 MaxKey/OAuth2 Proxy
|
||||
// 的心智(子 location 多是反向代理,继承省得每处再写)。
|
||||
if prev.iap {
|
||||
self.iap = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user