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