update:cors

This commit is contained in:
2026-03-09 21:58:13 +09:00
parent 40448571f0
commit 1f41741450
7 changed files with 551 additions and 149 deletions

View File

@@ -15,6 +15,7 @@ const isProd = process.env.NODE_ENV === 'production'
const app = Fastify({ logger: true })
await app.register(cors, {
methods: ['GET', 'POST', 'PATCH', 'DELETE', 'OPTIONS'],
origin: process.env.FRONTEND_URL ?? 'http://localhost:5173',
credentials: true,
})