feat(auth): 统一登录画框自动发起收窄到嵌入场景+带静默签发参数——CSP放行工作台嵌入
deploy-hxtesting / build-and-deploy (push) Successful in 1m10s

This commit is contained in:
syadmin committed 2026-11-29 23:26:51 +08:00
1 parent 4e071f9da0
commit 57adfe9c12
2 files changed
+32 -4

No files matched your search

+6 -3
View File
@@ -30,7 +30,10 @@ server {
application/xml application/rss+xml image/svg+xml font/ttf font/otf;
# 安全头配置
add_header X-Frame-Options "SAMEORIGIN" always;
# 防嵌入(T303 K2,2026-11-25):X-Frame-Options SAMEORIGIN 换成 CSP frame-ancestors 白名单——
# 允许本站自嵌('self')、统一工作台(本机联调口 + well-trust.com 子域正式口)把主站装进画框;
# 其余站点照旧拒绝。host 不带端口即匹配任意端口;/embed/ 挂件的按渠道策略不受影响(见下)。
add_header Content-Security-Policy "frame-ancestors 'self' http://127.0.0.1:* http://localhost:* https://*.well-trust.com http://*.well-trust.com" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
@@ -92,8 +95,8 @@ server {
# index.html 及 SPA fallback 不可缓存,否则前端升级后用户看不到新版本
add_header Cache-Control "no-cache, must-revalidate" always;
# nginx add_header 不从上层继承,需要在 location 内重复声明安全头
add_header X-Frame-Options "SAMEORIGIN" always;
# nginx add_header 不从上层继承,需要在 location 内重复声明安全头(T303 K2:与 server 级同款白名单)
add_header Content-Security-Policy "frame-ancestors 'self' http://127.0.0.1:* http://localhost:* https://*.well-trust.com http://*.well-trust.com" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;