Skip to content

Commit 2a804d4

Browse files
authored
Merge pull request #359 from prgrms-web-devcourse-final-project/fix#358
[fix] 보안 필터 및 카테고리 설정
2 parents f42bb91 + 6e172ba commit 2a804d4

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

src/main/java/com/back/global/security/SecurityConfig.java

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,26 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
6969
.requestMatchers("/login/oauth2/**").permitAll()
7070
.requestMatchers("/h2-console/**").permitAll()
7171

72-
//르프레시 갱신 및 칵테일 검색
72+
//리프레시 갱신 및 칵테일 검색
7373
.requestMatchers(GET, "/user/auth/me").permitAll()
7474
.requestMatchers(POST, "/user/auth/refresh").permitAll()
75-
.requestMatchers(GET, "/cocktails").permitAll()
76-
.requestMatchers(GET, "/cocktails/{id}").permitAll()
7775
.requestMatchers(POST, "/cocktails/search").permitAll()
78-
.requestMatchers(GET, "/cocktails/{id}/share").permitAll()
7976

8077
// 권한 불필요 - 조회 API
8178
.requestMatchers(GET, "/").permitAll()
8279
.requestMatchers(GET, "/actuator/**").permitAll()
83-
84-
.requestMatchers(GET, "/posts").permitAll()
85-
.requestMatchers(GET, "/posts/{postId}").permitAll()
86-
.requestMatchers(GET, "/posts/{postId}/comments").permitAll()
87-
.requestMatchers(GET, "/posts/{postId}/comments/{commentId}").permitAll()
88-
.requestMatchers(GET, "/cocktails/{cocktailId}/comments").permitAll()
89-
.requestMatchers(GET, "/cocktails/{cocktailId}/comments/{cocktailCommentId}").permitAll()
90-
.requestMatchers(GET, "/category").permitAll()
91-
92-
// 나머지 모든 API는 인증 필요
93-
.anyRequest().authenticated()
80+
.requestMatchers(GET, "/cocktails/**").permitAll()
81+
82+
.requestMatchers(GET, "/posts").permitAll()
83+
.requestMatchers(GET, "/posts/{postId}").permitAll()
84+
.requestMatchers(GET, "/posts/{postId}/comments").permitAll()
85+
.requestMatchers(GET, "/posts/{postId}/comments/{commentId}").permitAll()
86+
.requestMatchers(GET, "/cocktails/{cocktailId}/comments").permitAll()
87+
.requestMatchers(GET, "/cocktails/{cocktailId}/comments/{cocktailCommentId}").permitAll()
88+
.requestMatchers(GET, "/category").permitAll()
89+
90+
// 나머지 모든 API는 인증 필요
91+
.anyRequest().authenticated()
9492

9593

9694
// 회원 or 인증된 사용자만 가능

0 commit comments

Comments
 (0)