diff --git a/src/main/java/com/bbteam/budgetbuddies/global/config/SecurityConfig.java b/src/main/java/com/bbteam/budgetbuddies/global/config/SecurityConfig.java index dc28772d..d8b7e218 100644 --- a/src/main/java/com/bbteam/budgetbuddies/global/config/SecurityConfig.java +++ b/src/main/java/com/bbteam/budgetbuddies/global/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.core.env.Environment; 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; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.provisioning.InMemoryUserDetailsManager; @@ -29,6 +30,7 @@ public SecurityConfig(Environment env) { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http + .csrf(AbstractHttpConfigurer::disable) // csrf 설정 비활성화 .authorizeHttpRequests(authorizeRequests -> authorizeRequests .requestMatchers("/swagger-ui/**", "/v3/api-docs/**").hasRole("ADMIN")