Skip to content

Commit

Permalink
chore : local CORS Open
Browse files Browse the repository at this point in the history
  • Loading branch information
dltjdgh0428 committed Mar 27, 2024
1 parent 41a89cd commit a24d659
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public CorsConfigurationSource corsConfigurationSource() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration();
// 구체적인 출처 지정
config.setAllowedOrigins(Arrays.asList("https://www.bookeverywhere.site"));
config.setAllowedOrigins(Arrays.asList("https://www.bookeverywhere.site","http://localhost:3000"));
// 또는 패턴을 사용하여 출처 지정
config.setAllowedOriginPatterns(Arrays.asList("https://*.bookeverywhere.site"));
config.setAllowedOriginPatterns(Arrays.asList("https://*.bookeverywhere.site","http://localhost:3000"));
config.setAllowCredentials(true); // 크리덴셜 허용
config.addAllowedHeader("*");
config.addAllowedMethod("*");
Expand Down

0 comments on commit a24d659

Please sign in to comment.