docs: Phase 1 移除 CORS 中间件任务

- CORS 由 Nginx 反向代理统一处理,不在后端实现
This commit is contained in:
hhs
2026-06-13 15:18:11 +08:00
parent da87ec776b
commit 991ae4834c

View File

@@ -20,8 +20,9 @@
| 1.2 | 实现错误码常量 + WS 错误发送工具 | `internal/errors/codes.go` | 10 个错误码常量 + `SendWSError(client, code, requestID, err)` |
| 1.3 | main.go 接入 config.Load() | `cmd/server/main.go` | 用 `cfg.Server.Host:Port` 替换硬编码 `:8080`,初始化 logger |
| 1.4 | 添加 graceful shutdown | `cmd/server/main.go` | `signal.NotifyContext` + `http.Server.Shutdown`10s drain |
| 1.5 | 添加 CORS 中间件 | `cmd/server/main.go` | 开发阶段允许所有来源,生产走 Nginx 同源 |
| 1.6 | 添加 .gitignore | `backend/.gitignore` | 排除 `server` 二进制、`.env``tmp/` |
| 1.5 | 添加 .gitignore | `backend/.gitignore` | 排除 `server` 二进制、`.env``tmp/` |
> **CORS**:不在此处实现,生产环境由 Nginx 反向代理统一处理跨域。
---