Enable CORS with default settings

This commit is contained in:
Suman991 2026-04-09 11:24:37 +05:30
parent 89fc5d680d
commit 99c88d2800

View File

@ -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()