From 1ddf50d47dc626815dd24b5b856fd867bcf35562 Mon Sep 17 00:00:00 2001 From: qlido Date: Thu, 7 Dec 2023 16:03:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/setkies/sinp/global/config/security/SecurityConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/setkies/sinp/global/config/security/SecurityConfig.java b/src/main/java/com/setkies/sinp/global/config/security/SecurityConfig.java index 96073e8..43b3dd0 100644 --- a/src/main/java/com/setkies/sinp/global/config/security/SecurityConfig.java +++ b/src/main/java/com/setkies/sinp/global/config/security/SecurityConfig.java @@ -5,6 +5,7 @@ import lombok.AllArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.Customizer; 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.configurers.AbstractHttpConfigurer; @@ -28,6 +29,7 @@ public SecurityFilterChain configure(HttpSecurity http) throws Exception { http .csrf(AbstractHttpConfigurer::disable) .formLogin(AbstractHttpConfigurer::disable) + .cors(Customizer.withDefaults()) .sessionManagement((sessionManagement) -> sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .authorizeHttpRequests(request -> request .requestMatchers(CorsUtils::isPreFlightRequest).permitAll()