feat: comment out CORS configuration in bootstrap function

This commit is contained in:
2026-06-15 21:50:29 +03:30
parent f94a108948
commit ac2e7f5dab
+17 -17
View File
@@ -83,25 +83,25 @@ async function bootstrap() {
} }
} }
app.enableCors({ // app.enableCors({
origin: (origin, callback) => { // origin: (origin, callback) => {
if (!origin) { // if (!origin) {
callback(null, true) // callback(null, true)
return // return
} // }
if (isOriginAllowed(origin)) { // if (isOriginAllowed(origin)) {
callback(null, true) // callback(null, true)
return // return
} // }
callback(new Error('Not allowed by CORS'), false) // callback(new Error('Not allowed by CORS'), false)
}, // },
credentials: true, // credentials: true,
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS', // methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
allowedHeaders: // allowedHeaders:
'Content-Type, Accept, Authorization, X-Requested-With, X-CSRF-Token, pos_id', // 'Content-Type, Accept, Authorization, X-Requested-With, X-CSRF-Token, pos_id',
}) // })
// Register global logging and response mapping interceptors // Register global logging and response mapping interceptors
app.useGlobalInterceptors(new LoggingInterceptor(), new ResponseMappingInterceptor()) app.useGlobalInterceptors(new LoggingInterceptor(), new ResponseMappingInterceptor())