Skip to content

Commit fedac07

Browse files
committed
test:HTTP 명시 및 주석 추가
1 parent d71590f commit fedac07

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,23 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
6464
.addFilterBefore(customAuthenticationFilter, UsernamePasswordAuthenticationFilter.class)
6565
.authorizeHttpRequests(auth -> auth
6666

67-
68-
.requestMatchers("/").permitAll()
69-
.requestMatchers("/actuator/**").permitAll()
67+
// OAuth, GET POST 둘 다 사용
7068
.requestMatchers("/oauth2/**").permitAll()
7169
.requestMatchers("/login/oauth2/**").permitAll()
72-
.requestMatchers("/user/auth/refresh").permitAll()
70+
71+
//르프레시 갱신 및 칵테일 검색
72+
.requestMatchers(POST, "/user/auth/refresh").permitAll()
73+
.requestMatchers(POST, "/cocktails/search").permitAll()
7374

7475
// share은 인증 필요
7576
.requestMatchers(GET, "/cocktails/{id}/share").authenticated()
7677

7778
// 권한 불필요 - 조회 API
79+
.requestMatchers(GET, "/").permitAll()
80+
.requestMatchers(GET, "/actuator/**").permitAll()
81+
7882
.requestMatchers(GET, "/cocktails/**").permitAll()
79-
.requestMatchers(POST, "/cocktails/search").permitAll()
83+
8084
.requestMatchers(GET, "/posts").permitAll()
8185
.requestMatchers(GET, "/posts/{postId}").permitAll()
8286
.requestMatchers(GET, "/posts/{postId}/comments").permitAll()

0 commit comments

Comments
 (0)