feat: comment out CORS configuration in bootstrap function
This commit is contained in:
+17
-17
@@ -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())
|
||||||
|
|||||||
Reference in New Issue
Block a user