From c4fdfb12806c0f8ac4aef50c858ff9bbe49cdc20 Mon Sep 17 00:00:00 2001 From: DmitriyA Date: Wed, 26 Mar 2025 08:40:53 -0400 Subject: [PATCH] delete CORS --- src/main.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index 88fd9d2..c76cb40 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,15 +3,11 @@ import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AppModule); + const app = await NestFactory.create(AppModule, { cors: false }); //настройка CORS - app.enableCors({ - origin: '*', - methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS', - allowedHeaders: 'Content-Type, Authorization', - }); + await app.listen(process.env.PORT ?? 3000); } bootstrap(); \ No newline at end of file -- 2.40.1