🔒 fix(auth): 管理面板添加 API Key 鉴权

- 移除 /api/ 路由的鉴权豁免,所有数据接口必须携带 API Key
- 仅 /healthz 和 /admin/(HTML 页面壳)免鉴权
- 前端新增登录遮罩层,401 时弹出 API Key 输入框
- Key 存储在 sessionStorage,所有 API 请求自动附加 X-API-Key header
- 支持 ?apiKey=xxx URL 参数自动登录(登录后从 URL 移除避免泄露)
This commit is contained in:
2026-05-04 19:01:32 +08:00
parent 29433dda02
commit 832ed063a0
3 changed files with 76 additions and 10 deletions

3
.gitignore vendored
View File

@@ -7,6 +7,9 @@ wheels/
*.egg-info
.claude
CLAUDE.md
codestable
# Virtual environments
.venv