se agrego el modo pruebas
This commit is contained in:
+7
-1
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user