Skip to content

Commit

Permalink
Hotfix: CORS 지정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyxklee committed Feb 5, 2025
1 parent b5d6194 commit 9a789e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/com/gachtaxi/global/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import java.util.Arrays;
import java.util.List;

import static com.gachtaxi.domain.members.entity.enums.Role.*;

Expand Down Expand Up @@ -67,8 +66,7 @@ public AuthenticationManager authenticationManager(AuthenticationConfiguration c
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
// configuration.setAllowedOriginPatterns(Arrays.asList("http://localhost:3000"));
configuration.setAllowedOriginPatterns(List.of("*"));
configuration.setAllowedOrigins(Arrays.asList("http://localhost:3000", "https://gachtaxi.site", "https://144.24.85.74.nip.io"));
configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PATCH", "DELETE", "OPTIONS"));
configuration.setAllowedHeaders(Arrays.asList("*"));
configuration.setExposedHeaders(Arrays.asList("Authorization", "Set-Cookie"));
Expand Down

0 comments on commit 9a789e6

Please sign in to comment.