Files
Nexus/docs/changelog/2026-06-04-preview-vendor-and-install-b904.md
T
Nexus Deploy a2ae74d582 release: BUG fixes batch 1-6, full bug scan docs, Ubuntu/Linux dev
- Backend: auth refresh reuse, schedule/retry/sync/agent/files fixes
- Frontend: push WS, files ETag browse, vite build assets
- Docs: audit/changelog, production deploy gate, bug scan registry B7-77
- Deploy: deploy-production.sh, prune assets, gate logs
2026-06-04 14:01:14 +08:00

1.3 KiB
Raw Blame History

2026-06-04 — 预览页去 CDN + install.py B904

摘要

  • web/app/preview*.html 的 Tailwind 从 jsDelivr CDN 改为本地 /app/vendor/tailwindcss-browser.js,与业务页一致,满足离线/内网与安全策略。
  • server/api/install.py 锁定安装前校验管理员时,503 异常改为 raise ... from e,消除 ruff B904。

动机

  • tests/test_security_unit.py::test_html_pages_do_not_load_external_cdn 因 4 个预览 HTML 仍引 CDN 失败。
  • ruff check server/install.py:659 报 B904raise 未链式原异常)。

涉及文件

文件 变更
web/app/preview.html CDN → vendor
web/app/preview-v3.html 同上
web/app/preview-v4.html 同上
web/app/preview-v5.html 同上
server/api/install.py HTTPException 503 from e

迁移 / 重启

  • 无需 DB 迁移;改静态 HTML 与 API 一处,重启 uvicorn 即可(仅 install 路径需 reload)。

验证

ruff check server/api/install.py          # All checks passed
pytest tests/test_security_unit.py::test_html_pages_do_not_load_external_cdn
pytest tests/ -q                          # 136 passed
rg 'cdn.jsdelivr|unpkg.com' web/app/*.html  # 无匹配

进度

☑实现 ☑WSL验证 ☐审计8步 ☐部署 ☐健康检查 ☐浏览器验证 ☑changelog