From b30de8d7af8abd3f689c3f59a2e782fca66b466c Mon Sep 17 00:00:00 2001 From: dongmucat <1127093059@qq.com> Date: Tue, 28 Apr 2026 14:49:50 +0800 Subject: [PATCH] fix(auth): add /api/cli/ path to ApiTokenAuthenticationFilter Enable API token authentication for CLI endpoints by adding /api/cli/ to the filter's path whitelist. Previously, CLI endpoints were not processed by the token authentication filter, causing all Bearer token requests to fail with 401. --- .../skillhub/auth/token/ApiTokenAuthenticationFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/skillhub-auth/src/main/java/com/iflytek/skillhub/auth/token/ApiTokenAuthenticationFilter.java b/server/skillhub-auth/src/main/java/com/iflytek/skillhub/auth/token/ApiTokenAuthenticationFilter.java index 82c0f2c1..6f594c1e 100644 --- a/server/skillhub-auth/src/main/java/com/iflytek/skillhub/auth/token/ApiTokenAuthenticationFilter.java +++ b/server/skillhub-auth/src/main/java/com/iflytek/skillhub/auth/token/ApiTokenAuthenticationFilter.java @@ -88,6 +88,7 @@ public class ApiTokenAuthenticationFilter extends OncePerRequestFilter { protected boolean shouldNotFilter(HttpServletRequest request) { String path = request.getRequestURI(); return !(path.startsWith("/api/v1/") - || path.startsWith("/api/web/")); + || path.startsWith("/api/web/") + || path.startsWith("/api/cli/")); } }