diff --git a/.memory/deployment-kang.md b/.memory/deployment-kang.md index 9dc12d2..e2e9b4a 100644 --- a/.memory/deployment-kang.md +++ b/.memory/deployment-kang.md @@ -25,6 +25,13 @@ Incus LXC hermes-personal (10.3.73.137, Debian trixie, privileged + nesting) # 关键决策 +## CORS 白名单必须配(2026-04-21 事后补的坑) +- Hermes gateway 的 API Server 会检查 `Origin` header 白名单 +- `.env` 里必须 `API_SERVER_CORS_ORIGINS=https://hermes.kang-kang.com` +- 不配的话:curl 测试一切 200(curl 不发 Origin),但**真实浏览器发 POST /api/v1/chat/completions 会返回 403 body=0**(Hermes CORS 拒绝) +- 公司版 .env 原本就配了 `https://hermes.milejoy.com`,我 fork 时抄漏了 +- 修复:加环境变量 → `docker compose down && up`(不能 restart) + ## 为什么用 Debian trixie 不用 Ubuntu 24.04 - Ubuntu 24.04 + Docker 29 在非/特权 LXC 内启动容器报 `net.ipv4.ip_unprivileged_port_start: permission denied` - Debian trixie + Docker 26 没这个 bug(公司版 hermes-box 用的就是这个组合,直接照搬) diff --git a/.memory/worklog.json b/.memory/worklog.json index fecf1b4..e0d5c8e 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -153,6 +153,13 @@ "message": "auto-save 2026-04-21 13:31 (~1)", "hash": "6cc2427", "files_changed": 1 + }, + { + "ts": "2026-04-21T13:36:59+08:00", + "type": "commit", + "message": "auto-save 2026-04-21 13:36 (~1)", + "hash": "a408aa3", + "files_changed": 1 } ] }