Skip to content

Commit 7509295

Browse files
committed
fix: 비회원 게시물, 댓글 조회 허용
1 parent c3706c7 commit 7509295

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/com/dmu/debug_visual/config/SecurityConfig.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.springframework.context.annotation.Profile;
99
import org.springframework.core.annotation.Order;
1010
import org.springframework.http.HttpHeaders;
11+
import org.springframework.http.HttpMethod;
1112
import org.springframework.http.MediaType;
1213
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
1314
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
@@ -76,7 +77,9 @@ public SecurityFilterChain publicFilterChain(HttpSecurity http) throws Exception
7677
"/api/users/signup",
7778
"/swagger-ui/**",
7879
"/v3/api-docs/**",
79-
"/api/code/**"
80+
"/api/code/**",
81+
"/api/comments",
82+
"/api/posts"
8083
).permitAll()
8184
.anyRequest().permitAll()
8285
);
@@ -100,7 +103,9 @@ public SecurityFilterChain devSecurityFilterChain(HttpSecurity http) throws Exce
100103
"/api/users/signup",
101104
"/swagger-ui/**",
102105
"/v3/api-docs/**",
103-
"/api/code/**"
106+
"/api/code/**",
107+
"/api/comments",
108+
"/api/posts"
104109
).permitAll()
105110
// 그 외 모든 요청은 인증을 요구하도록 설정 (!dev 환경과 유사하게)
106111
.anyRequest().authenticated()

0 commit comments

Comments
 (0)