diff --git a/src/main.ts b/src/main.ts index 1968aa9..52a9e55 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,7 +13,11 @@ import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; async function bootstrap() { const app = await NestFactory.create(AppModule); - app.enableCors({ exposedHeaders: ['Content-Disposition'] }); + app.enableCors({ + origin: [process.env.FRONTEND_URL], // solo frontend permitido + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', + credentials: true, + }); app.useGlobalPipes( new ValidationPipe({