From ac2e7f5dab40044c76719383d3bde84ccab72b87 Mon Sep 17 00:00:00 2001 From: ahasani194 Date: Mon, 15 Jun 2026 21:50:29 +0330 Subject: [PATCH] feat: comment out CORS configuration in bootstrap function --- src/main.ts | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main.ts b/src/main.ts index 476542d..0889a26 100644 --- a/src/main.ts +++ b/src/main.ts @@ -83,25 +83,25 @@ async function bootstrap() { } } - app.enableCors({ - origin: (origin, callback) => { - if (!origin) { - callback(null, true) - return - } + // app.enableCors({ + // origin: (origin, callback) => { + // if (!origin) { + // callback(null, true) + // return + // } - if (isOriginAllowed(origin)) { - callback(null, true) - return - } + // if (isOriginAllowed(origin)) { + // callback(null, true) + // return + // } - callback(new Error('Not allowed by CORS'), false) - }, - credentials: true, - methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS', - allowedHeaders: - 'Content-Type, Accept, Authorization, X-Requested-With, X-CSRF-Token, pos_id', - }) + // callback(new Error('Not allowed by CORS'), false) + // }, + // credentials: true, + // methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS', + // allowedHeaders: + // 'Content-Type, Accept, Authorization, X-Requested-With, X-CSRF-Token, pos_id', + // }) // Register global logging and response mapping interceptors app.useGlobalInterceptors(new LoggingInterceptor(), new ResponseMappingInterceptor())