Skip to content

Commit b960d2d

Browse files
core: configuracion para cors
core: configuracion para cors
2 parents d67f8ea + 9d0b4eb commit b960d2d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ async function bootstrap() {
88

99
app.setGlobalPrefix('api');
1010

11+
const corsOrigins = process.env.CORS_ORIGIN?.split(',') ?? [];
12+
1113
app.enableCors({
12-
origin: process.env.CORS_ORIGIN ?? true,
14+
origin: corsOrigins,
1315
});
1416

1517
app.useGlobalPipes(

0 commit comments

Comments
 (0)