diff --git a/backend/src/main.ts b/backend/src/main.ts index e03661f..8e98628 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -8,7 +8,13 @@ const corsOptions = { async function bootstrap() { const app = await NestFactory.create(AppModule); - app.enableCors(corsOptions); + app.enableCors({ + origin: ['https://blog.anatid.net'], // Allowed origins + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', // Allowed methods + credentials: true, // Allow credentials (e.g., cookies) + allowedHeaders: 'Content-Type, Accept', // Allowed headers + }); + await app.listen(process.env.PORT ?? 3000); }