Skip to content

Commit

Permalink
[Refactor] CORS설정
Browse files Browse the repository at this point in the history
  • Loading branch information
hen715 committed Jan 30, 2024
1 parent 288a07d commit c8832b3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws
@Override
public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOriginPatterns(List.of("*"));
configuration.setAllowCredentials(true);
configuration.addAllowedHeader("*");
configuration.setExposedHeaders(Collections.singletonList("*"));
configuration.setAllowedOrigins(Collections.singletonList("*"));
configuration.setExposedHeaders(List.of("*"));
configuration.setAllowedOrigins(List.of("*"));
configuration.setAllowedMethods(List.of("GET","POST","DELETE","PUT"));
configuration.setMaxAge(3600L);
return configuration;
Expand Down

0 comments on commit c8832b3

Please sign in to comment.