Skip to content

Commit 6836a4d

Browse files
committed
[Chore] Dev CORS에 localhost 추가
1 parent d68a20e commit 6836a4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/moa/moa_server/config/security/DevSecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http, CorsConfigurat
6060
public CorsConfigurationSource corsConfigurationSource() {
6161
CorsConfiguration config = new CorsConfiguration();
6262

63-
config.setAllowedOriginPatterns(List.of(frontendUrl)); // 요청을 허용할 출처(origin) 패턴을 설정
63+
config.setAllowedOriginPatterns(List.of(frontendUrl, "http://localhost:5173")); // 요청을 허용할 출처(origin) 패턴을 설정
6464
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")); // 허용할 HTTP 메서드 목록 지정
6565
config.setAllowedHeaders(List.of("*")); // 모든 요청 헤더 허용
6666
config.setAllowCredentials(true); // 인증 정보를 포함한 요청(Cookie 등)을 허용

0 commit comments

Comments
 (0)