enabling cors
This commit is contained in:
@@ -9,11 +9,11 @@ async function bootstrap() {
|
|||||||
const httpService = new HttpService();
|
const httpService = new HttpService();
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
|
|
||||||
// app.enableCors({
|
app.enableCors({
|
||||||
// origin: process.env.NODE_ENV === 'development' ? 'http://localhost:8080' : `https://${process.env.CONTAINER_APP_NAME}.${process.env.CONTAINER_APP_ENV_DNS_SUFFIX}`,
|
origin: 'https://flying-test.salmonpond-4268003a.centralus.azurecontainerapps.io',
|
||||||
// methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||||
// credentials: true,
|
credentials: true,
|
||||||
// });
|
});
|
||||||
app.setGlobalPrefix('api');
|
app.setGlobalPrefix('api');
|
||||||
app.useGlobalFilters(new HttpExceptionFilter());
|
app.useGlobalFilters(new HttpExceptionFilter());
|
||||||
app.use(
|
app.use(
|
||||||
|
|||||||
Reference in New Issue
Block a user