Skip to content

Commit

Permalink
Chore: authorizeHttpRequests 비활성화
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoung-dev committed Sep 12, 2024
1 parent e718396 commit c4b39c3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class SecurityConfig {
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
.csrf(csrf -> csrf.disable()) // CSRF 비활성화
.authorizeHttpRequests(auth -> auth
// ADMIN 역할이 있는 사용자만 접근 가능
.requestMatchers("/order/admin/**").hasRole("ADMIN")
// 나머지 요청은 누구나 접근 가능
.anyRequest().permitAll()
)
// .authorizeHttpRequests(auth -> auth
// // ADMIN 역할이 있는 사용자만 접근 가능
// .requestMatchers("/order/admin/**").hasRole("ADMIN")
// // 나머지 요청은 누구나 접근 가능
// .anyRequest().permitAll()
// )
.logout(logout -> logout
.logoutUrl("/account/logout")
.logoutSuccessHandler((request, response, authentication) ->
Expand Down

0 comments on commit c4b39c3

Please sign in to comment.