Breaking Change
In order to provides safer default, we change the methods
to the CORS-safelisted methods.
If you want to resume the previous behaviour, you need to explicitly specify the methods,
import Fastify from 'fastify'
import cors from '@fastify/cors'
const fastify = Fastify()
await fastify.register(cors, {
methods: "GET,HEAD,PUT,PATCH,POST,DELETE"
})
What's Changed
- style: destructure imports by @Fdawgs in #360
- refactor(index): change default
methods
to cors-safelisted methods by @Fdawgs in #359
Full Changelog: v10.1.0...v11.0.0