Skip to content

Commit 6aede29

Browse files
committed
Chore: Spring Security 임시로 모든 요청 permitAll 설정
1 parent fe0bc9a commit 6aede29

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/java/com/DecodEat/global/config/WebOAuthSecurityConfig.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
5353

5454
// 3. 요청별 인가 규칙 설정
5555
http.authorizeHttpRequests(auth -> auth
56-
.requestMatchers("/img/**", "/css/**", "/js/**", "/favicon.ico", "/error").permitAll()
57-
.requestMatchers("/swagger-ui/**","/v3/api-docs/**").permitAll() // 토큰 재발급 요청은 누구나 가능
58-
.requestMatchers("/api/token").permitAll()
59-
.requestMatchers("/api/users/**").hasAnyRole("USER", "ADMIN") // 유저 관련 API는 USER 또는 ADMIN 권한 필요
60-
.requestMatchers("/api/admin/**").hasRole("ADMIN") // 어드민 관련 API는 ADMIN 권한만 가능
61-
.anyRequest().authenticated()); // 나머지 요청은 인증 필요
56+
.anyRequest().permitAll());
57+
// .requestMatchers("/img/**", "/css/**", "/js/**", "/favicon.ico", "/error").permitAll()
58+
// .requestMatchers("/swagger-ui/**","/v3/api-docs/**").permitAll() // 토큰 재발급 요청은 누구나 가능
59+
// .requestMatchers("/api/token").permitAll()
60+
// .requestMatchers("/api/users/**").hasAnyRole("USER", "ADMIN") // 유저 관련 API는 USER 또는 ADMIN 권한 필요
61+
// .requestMatchers("/api/admin/**").hasRole("ADMIN") // 어드민 관련 API는 ADMIN 권한만 가능
62+
// .anyRequest().authenticated()); // 나머지 요청은 인증 필요
6263

6364
// 4. OAuth2 로그인 설정
6465
http.oauth2Login(oauth2 -> oauth2

0 commit comments

Comments
 (0)