mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-10 03:27:54 +00:00
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:
parent
351dddc912
commit
b30de8d7af
1 changed files with 2 additions and 1 deletions
|
|
@ -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/"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue