CORS / Helmet


cd server
npm install fastify-cors fastify-helmet
server/service/app.ts
import Fastify from 'fastify'
import helmet from 'fastify-helmet'
import cors from 'fastify-cors'
import server from './$server'
const fastify = Fastify()
fastify.register(helmet)
fastify.register(cors)
server(fastify, { basePath: '/api/v1' })
fastify.listen(3000)

fastify-cors
fastify-helmet