Skip to content

Commit 5d0c396

Browse files
authored
Merge pull request #34 from AI-Tutor-2024/develop
cors 오류 수정 테스트
2 parents 8e350e8 + 016b6e6 commit 5d0c396

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/com/example/ai_tutor/global/config/security/SecurityConfig.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,12 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
103103
@Bean
104104
public CorsConfigurationSource corsConfigurationSource() {
105105
CorsConfiguration configuration = new CorsConfiguration();
106+
106107
// 모든 출처 허용
107108
configuration.addAllowedOriginPattern("*");
108-
configuration.addAllowedOrigin("https://www.ai-tutor.co.kr");
109-
configuration.addAllowedOrigin("http://localhost:3000");
110-
configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
111-
configuration.setAllowedHeaders(List.of("*"));
109+
configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"));
110+
configuration.setAllowedHeaders(Arrays.asList("*"));
112111
configuration.setAllowCredentials(true);
113-
114112
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
115113
source.registerCorsConfiguration("/**", configuration);
116114
return source;

0 commit comments

Comments
 (0)