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.
This commit is contained in:
dongmucat 2026-04-28 14:49:50 +08:00
parent 351dddc912
commit b30de8d7af

View file

@ -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/"));
}
}