diff --git a/src/main/java/hackerthon/likelion13th/canfly/global/config/SecurityConfig.java b/src/main/java/hackerthon/likelion13th/canfly/global/config/SecurityConfig.java index 89c7161..395e48f 100644 --- a/src/main/java/hackerthon/likelion13th/canfly/global/config/SecurityConfig.java +++ b/src/main/java/hackerthon/likelion13th/canfly/global/config/SecurityConfig.java @@ -79,8 +79,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti @Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); - configuration.setAllowedOriginPatterns(List.of("*")); - configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS")); + configuration.setAllowedOriginPatterns(Arrays.asList("http://localhost:3000", "http://127.0.0.1:3000", "https://can-fly.netlify.app")); + configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")); configuration.setAllowCredentials(true); configuration.setMaxAge(3600L); configuration.setAllowedHeaders(List.of("*"));