Skip to content

Commit

Permalink
HOTFIX: CORS 와일드카드로 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
hyxklee committed Oct 8, 2024
1 parent 573425e commit 11d3efd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/leets/weeth/global/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {


@Bean
public CorsConfigurationSource corsConfigurationSource() {
public CorsConfigurationSource source() {
CorsConfiguration configuration = new CorsConfiguration();

configuration.setAllowedOrigins(Arrays.asList("http://localhost:3000"));
configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PATCH", "DELETE"));
configuration.setAllowedHeaders(Arrays.asList("*"));
configuration.setExposedHeaders(Arrays.asList("Authorization, Authorization_refresh"));
configuration.addAllowedOriginPattern("*");
configuration.addAllowedHeader("*");
configuration.addAllowedMethod("*");
configuration.addExposedHeader("Authorization");
configuration.addExposedHeader("Authorization_refresh");
configuration.setAllowCredentials(true);

UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
Expand Down

0 comments on commit 11d3efd

Please sign in to comment.