diff --git a/backend/src/main/java/io/linkloud/api/global/security/SecurityConfig.java b/backend/src/main/java/io/linkloud/api/global/security/SecurityConfig.java index 1ca1d894..e6a9ce30 100644 --- a/backend/src/main/java/io/linkloud/api/global/security/SecurityConfig.java +++ b/backend/src/main/java/io/linkloud/api/global/security/SecurityConfig.java @@ -29,8 +29,6 @@ public class SecurityConfig { @Bean public SecurityFilterChain configure(HttpSecurity http) throws Exception { return http - .cors().configurationSource(corsConfigurationSource()) - .and() .csrf().disable() .formLogin().disable() .httpBasic().disable() @@ -56,18 +54,4 @@ public SecurityFilterChain configure(HttpSecurity http) throws Exception { ) .build(); } - - @Bean - public CorsConfigurationSource corsConfigurationSource() { - CorsConfiguration configuration = new CorsConfiguration(); - configuration.addAllowedOrigin("https://linkloud.io"); - configuration.addAllowedOrigin("http://localhost:5173"); - - configuration.addAllowedMethod("*"); // 모든 메소드 허용. - configuration.addAllowedHeader("*"); - configuration.setAllowCredentials(true); - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - source.registerCorsConfiguration("/**", configuration); - return source; - } }