Skip to content

Commit

Permalink
Merge pull request #154 from BudgetBuddiesTeam/fix/#153
Browse files Browse the repository at this point in the history
  • Loading branch information
ggamD00 authored Aug 21, 2024
2 parents 9a5516a + cdc3f3c commit 6ec29f5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")
Expand Down

0 comments on commit 6ec29f5

Please sign in to comment.