fix(security): 放行评论数接口匿名访问

This commit is contained in:
Zhou Weidong committed 2026-10-21 11:46:18 +08:00
1 parent 8e6213aed8
commit 7579d3163a
2 files changed
+107

No files matched your search

@@ -74,6 +74,7 @@ public class SecurityConfig {
.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
/* 评论列表允许匿名浏览;发布/删除仍需登录(未列入白名单即需鉴权) */
.requestMatchers(HttpMethod.GET, "/app/comments").permitAll()
.requestMatchers(HttpMethod.GET, "/app/comments/count").permitAll()
.requestMatchers(PUBLIC_PATHS).permitAll()
.anyRequest().authenticated())
.exceptionHandling(handling -> handling