diff --git a/src/main/java/org/sopt/lequuServer/global/config/SecurityConfig.java b/src/main/java/org/sopt/lequuServer/global/config/SecurityConfig.java index 18e2156..409e640 100644 --- a/src/main/java/org/sopt/lequuServer/global/config/SecurityConfig.java +++ b/src/main/java/org/sopt/lequuServer/global/config/SecurityConfig.java @@ -7,14 +7,10 @@ import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; import static org.sopt.lequuServer.global.auth.security.AuthWhiteList.AUTH_WHITELIST; @@ -42,24 +38,4 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .addFilterBefore(jwtExceptionFilter, JwtAuthenticationFilter.class) .build(); } - - @Bean - public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - - CorsConfiguration config = new CorsConfiguration(); - config.setAllowCredentials(true); - config.addAllowedOrigin("*"); - config.addAllowedHeader("*"); - config.addAllowedMethod("*"); - source.registerCorsConfiguration("/v3/api-docs", config); - return new CorsFilter(source); - } - - @Bean - public WebSecurityCustomizer webSecurityCustomizer() { - return web -> web.ignoring().requestMatchers( - "/swagger-ui/**", "/swagger-resources/**", "/api-docs/**", - "/v3/api-docs/**", "/webjars/**"); - } } \ No newline at end of file diff --git a/src/main/resources/logback-dev.xml b/src/main/resources/logback-dev.xml index dbd84bb..4e6f3af 100644 --- a/src/main/resources/logback-dev.xml +++ b/src/main/resources/logback-dev.xml @@ -27,10 +27,6 @@ - - \ No newline at end of file diff --git a/src/main/resources/logback-local.xml b/src/main/resources/logback-local.xml index 2631145..b571506 100644 --- a/src/main/resources/logback-local.xml +++ b/src/main/resources/logback-local.xml @@ -10,9 +10,5 @@ - - \ No newline at end of file