File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/main/java/org/ezcode/codetest/common/security Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,12 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
7676 .requestMatchers (new DispatcherTypeRequestMatcher (DispatcherType .ASYNC )).permitAll ()
7777 .requestMatchers (
7878 SecurityPath .PUBLIC_PATH ).permitAll ()
79+ //GET요청인 문제 목록 조회, 문제 상세 조회는 가능하게, 나머지 HTTP메서드는 인증 필요하게 설정하기
80+ .requestMatchers (HttpMethod .GET , "/api/problems" , "/api/problems/{problemId}" ).permitAll ()
81+ .requestMatchers ("/api/problems/**" ).authenticated ()
7982 .requestMatchers ("/api/admin/**" ).hasRole ("ADMIN" ) //어드민 권한 필요 (문제 생성, 관리 등)
8083 .requestMatchers (HttpMethod .GET ,
8184 "/api/languages" ,
82- "/api/problems" ,
83- "/api/problems/{problemId}" ,
8485 "/api/problems/*/discussions" ,
8586 "/api/problems/{problemId}/discussions/{discussionId}/replies" ,
8687 "/api/problems/{problemId}/discussions/{discussionId}/replies/**" ).permitAll ()
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class SecurityPath {
1717 "/actuator/**" ,
1818 "/chatting" ,
1919 "/submit-test/**" ,
20- "/api/problems/**" ,
20+ // "/api/problems/**", //문제의 HTTP 요청에 따라 다르게 처리될 수 있도록 SecurityConfig에서 설정함
2121 "/ws/**" ,
2222 "/swagger-ui/**" ,
2323 "/swagger-resources/**" ,
You can’t perform that action at this time.
0 commit comments