se agrego el modo pruebas

This commit is contained in:
evenegas
2025-11-03 09:59:03 -06:00
parent b853d02be4
commit 3ac0e9e78c
+7 -1
View File
@@ -4,8 +4,14 @@ import { ValidationPipe } from '@nestjs/common';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
let origen
if (process.env.MODO === 'pruebas') {
origen = '*'
} else {
origen = [process.env.CORS_ORIGINS]
}
app.enableCors({
origin: [process.env.CORS_ORIGINS],
origin: origen,
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true,
});