fix(mcp): allowedorigins-removed message says v1.3.0, not v2.0.0

This commit is contained in:
2026-08-08 14:07:39 -06:00
parent 3961ae7175
commit e1802e4c25
6 changed files with 10813 additions and 8 deletions
+2 -2
View File
@@ -208,7 +208,7 @@ Whichever tier you pick, CORS origins always come from the framework var
> **CORS has one home: `server.Config.CORSOrigins`.** In framework `v1.x`, `web.Config`
> carried an `AllowedOrigins` field. It was env-backed through `v1.1.x` and a code-only override
> in `v1.2.0` — reading it after the env tag moved silently served *no* CORS. **`v2.0.0` removed the
> in `v1.2.0` — reading it after the env tag moved silently served *no* CORS. **`v1.3.0` removed the
> field entirely** so the mistake fails at compile time instead of at runtime. If you are migrating
> code that read `web.Config.AllowedOrigins` or set it in a struct literal, switch to
> `cfg.Server.CORSOrigins`:
@@ -218,7 +218,7 @@ Whichever tier you pick, CORS origins always come from the framework var
> // mw.CORS(cfg.Web.AllowedOrigins)
> // web.New(logger, web.Config{AllowedOrigins: origins})
>
> // v2.0.0 — the single source of truth:
> // v1.3.0 — the single source of truth:
> mw.CORS(cfg.Server.CORSOrigins) // server.New tier
> web.New(logger, web.Config{Server: cfg.Server}) // web.New reads it automatically
> ```