chore: add CSP/Permissions-Policy security headers and update production env vars

- Add Content-Security-Policy and Permissions-Policy headers to nginx config
- Add same headers to next.config.mjs for dev/preview mode
- Add Referrer-Policy to next.config.mjs (was only in nginx)
- Generate production JWT/CMS secrets via openssl rand -base64 64
- Update README mark production env/security header task as complete
This commit is contained in:
2026-07-31 22:36:12 +08:00
parent 20550558b8
commit a995f40eae
3 changed files with 10 additions and 2 deletions
+2 -2
View File
@@ -34,7 +34,7 @@
- [x] 生成 [RELEASE_REVIEW_REPORT.md](./RELEASE_REVIEW_REPORT.md)
- [x] 修复 tsconfig 中 dist 类型文件包含规则导致的 `type-check` 失败
- [x] 校正 README 技术栈版本与 package.json 一致
- [ ] 生产环境变量与 Nginx 安全头最终确认(上线前)
- [x] 生产环境变量与 Nginx 安全头最终确认(上线前)
- [x] CMS 数据模型扩展:为 ContentItem 增加 locale 字段与唯一索引
- [x] CMS 数据模型扩展:RBAC 角色与权限中间件
- [x] CMS 内容状态机与工作流:draft/review/published/archived + AuditLog
@@ -72,7 +72,7 @@
- [x] CMS化 ~75%:所有页面已集成 CMS 数据层、种子脚本覆盖全部内容类型
- [x] 清理旧版文件:归档 12 个旧版组件至 _archive/home-content-v11~v13, products-content-v1, product-detail-v1~v2, solutions-content-v1, news-content-v1, team-content-v1~v2, contact-content-v1~v2
- [x] 质量门禁通过:type-check ✅ / lint ✅(153 预存 errors / 992 tests ✅ / coverage 达标 ✅
- [x] 待上线前确认:生产环境变量与 Nginx 安全头
- [x] 生产环境变量与 Nginx 安全头确认完成:CSP / Permissions-Policy / HSTS 已配置,.env.production 密钥已生成
## 技术栈