enabling cors

This commit is contained in:
2025-12-31 17:21:04 -06:00
parent f421b8d231
commit 7cfe005154

View File

@@ -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(