Skip to content

Commit

Permalink
Merge pull request #30 from 1223v/test
Browse files Browse the repository at this point in the history
Fix: Cors 허용 헤더 추가
  • Loading branch information
1223v authored Nov 19, 2023
2 parents bb3f44a + 722cbe3 commit f1d8af2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ CorsConfigurationSource corsConfigurationSource() {
configuration.setAllowedOrigins(Arrays.asList("*"));
configuration.setAllowedMethods(Arrays.asList("POST", "PATCH", "GET", "DELETE"));

// TODO: 이 부분은 나중에 삭제해야 됨
//configuration.setAllowedMethods(Arrays.asList("*")); // 모든 HTTP 메서드 허용
configuration.setAllowedHeaders(Arrays.asList("*")); // 모든 헤더 허용
configuration.setAllowCredentials(true); // 크레덴셜(쿠키, HTTP 인증 등) 허용

UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration);
return source;
Expand Down

0 comments on commit f1d8af2

Please sign in to comment.