npm / @fastify/cors
@fastify/cors
What changed in @fastify/cors 9 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
1 breaking1 security1 new APIs and options1 behavior and defaults3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@fastify/cors 116 changes
Breaking changes 1
The default methods changed to CORS-safelisted methods; specify methods explicitly to resume the previous behavior.
Security 1
Fixes a security issue identified in GHSA-8c3j-mm64-257c.
New APIs and options 1
Route-level CORS configuration is now supported, allowing CORS settings to be specified for individual routes.
Fixes and other changes 3
An origin array containing '*' from a dynamic resolver or route-level config.cors now responds with Access-Control-Allow-Origin: *, matching the static origin: ['*'] option.
Origin resolution is skipped when a route disables CORS.
The vary parser preserves header tokens with whitespace preceding commas.
@fastify/cors 91 changes
Behavior and default changes 1
The Vary header is added only when the origin option is non-static.