Skip to content

Commit 93f6f02

Browse files
committed
🐛 fix: CORS 프론트엔드 도메인 명시적으로 설정
1 parent d7911fe commit 93f6f02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/src/main/java/io/f1/backend/global/config/CorsConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ public class CorsConfig {
1212
public CorsConfigurationSource corsConfigurationSource() {
1313
CorsConfiguration config = new CorsConfiguration();
1414

15-
config.addAllowedOriginPattern("*");
15+
config.addAllowedOrigin("http://localhost:3000"); // 개발 환경
16+
config.addAllowedOrigin("http://brainrace.duckdns.org"); // 배포 환경
17+
1618
config.addAllowedHeader("*");
1719
config.addAllowedMethod("*");
1820
config.setAllowCredentials(true);

0 commit comments

Comments
 (0)