Skip to content

Commit 9a8c2d0

Browse files
committed
fix : CORS 설정 추가
1 parent a83f860 commit 9a8c2d0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

BE/apps/api-server/src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ async function bootstrap() {
1717
whitelist: true,
1818
}),
1919
);
20+
app.enableCors({
21+
origin: ['https://boomap.site', 'https://www.boomap.site'],
22+
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
23+
credentials: true,
24+
});
2025

2126
const port = configService.get<number>('API_PORT');
2227
await app.listen(port);

BE/apps/socket-server/src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ async function bootstrap() {
1212
app.useGlobalFilters(new WsExceptionFilter());
1313

1414
const port = configService.get<number>('SOCKET_PORT');
15+
app.enableCors({
16+
origin: ['https://boomap.site', 'https://www.boomap.site'],
17+
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
18+
credentials: true,
19+
});
1520
await app.listen(port);
1621
}
1722
bootstrap();

0 commit comments

Comments
 (0)