Repository navigation
fix(headers): baseline security response headers across all three deploy targets - #12
Merged
Merged
Conversation
|
Warning Review limit reachedNext included review available in 58 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying umi-react-admin with
|
| Latest commit: |
6ccbedf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2a977063.umi-react-admin.pages.dev |
| Branch Preview URL: | https://fix-security-headers.umi-react-admin.pages.dev |
…loy targets audit 2026-09-22 H-3: vercel and github pages shipped zero security headers, docker lacked CSP/permissions-policy - vercel.json: nosniff / referrer-policy / XFO / permissions-policy / CSP via a headers block on all routes - nginx: permissions-policy + CSP as Report-Only for one iteration (source list verified per-domain against the built artifact), HSTS left as a documented example behind TLS termination - config.github.ts: meta CSP (platform cannot set response headers); umi replaces the metas array wholesale so the viewport entry is carried over explicitly - CSP source list: amap/autonavi JSONP, cesium ion, OSM tiles, virtualearth bing fallback, alicdn app icons, demo video CDN; 'unsafe-eval' retained for cesium knockout template compilation (verified in use), pdfjs runs with isEvalSupported:false verified in a headless browser against the github build served at its /umi-react-admin/ subpath: login -> home charts (5 canvases) -> cesium geoHash (canvas renders, knockout compiles) -> tinymce iframe, zero CSP violations on https sources; the only remaining blocks are http:// bing tiles that only occur when the page itself is served over http (uriScheme follows page protocol)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
审计 2026-09-22 H-3:三条部署产线中两条零安全响应头,Docker 产线缺 CSP/Permissions-Policy。无 CSP 意味着一旦出现 XSS 或第三方域劫持(如高德 JSONP 以页面全权限执行),没有任何纵深防御。
CSP 设计要点
'unsafe-eval'保留:Cesium Knockout 模板编译用new Function(实测在用);pdfjs 已关isEvalSupportedframe-ancestors(meta 版不支持),README 声明该平台限制验证(headless 浏览器,github 产线子路径静态服务)
http://Bing 瓦片(Cesium uriScheme 跟随页面协议,仅本地 http 环境出现;生产 https 自动走 https 瓦片),已在 nginx 注释中记录pnpm check全绿