Skip to content

Commit

Permalink
origins 값 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
HwangHoYoon committed Jan 20, 2024
1 parent dc7a73d commit dd7eb17
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/com/chwipoClova/common/config/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ public class CorsConfig {
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();

config.setAllowCredentials(true);
config.setAllowedOrigins(origins);
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
config.setAllowedHeaders(List.of("*"));
config.setExposedHeaders(List.of("*"));
config.setAllowCredentials(true);

//config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
//config.setAllowedHeaders(List.of("*"));
//config.setExposedHeaders(List.of("*"));

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

0 comments on commit dd7eb17

Please sign in to comment.