From 99c88d2800e8e0a91be3ea33629f27934a033af5 Mon Sep 17 00:00:00 2001 From: Suman991 Date: Thu, 9 Apr 2026 11:24:37 +0530 Subject: [PATCH] Enable CORS with default settings --- src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.ts b/src/main.ts index aa0d287..9e0a31a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,6 +6,7 @@ import { ConfigService } from '@nestjs/config'; async function bootstrap() { const app = await NestFactory.create(AppModule); + app.enableCors(); //Enable CORS with default settings app.useGlobalPipes( new ValidationPipe({ whitelist:true, // strips unknown properties from @Body()