This commit is contained in:
luke 2025-06-24 18:16:07 +08:00
parent 1236799852
commit 1231f0c826
2 changed files with 6 additions and 2 deletions

View File

@ -34,7 +34,7 @@ public class AuthFilter implements Filter {
// 需要鉴权的路径前缀 // 需要鉴权的路径前缀
if (path.startsWith("/api/v1/doc") if (path.startsWith("/api/v1/doc")
// || path.startsWith("/api/v1/llm") || path.startsWith("/api/v1/llm")
) { ) {
String token = request.getHeader("Authorization"); String token = request.getHeader("Authorization");

View File

@ -47,8 +47,12 @@ public class LogFilter extends OncePerRequestFilter {
ContentCachingResponseWrapper responseWrapper = new ContentCachingResponseWrapper(response); ContentCachingResponseWrapper responseWrapper = new ContentCachingResponseWrapper(response);
String accept = request.getHeader("Accept"); String accept = request.getHeader("Accept");
String contentType = response.getContentType(); String contentType = response.getContentType();
String requestURI = requestWrapper.getRequestURI();
logger.info("requestURI: " + requestURI);
if ((accept != null && accept.contains("text/event-stream")) if ((accept != null && accept.contains("text/event-stream"))
|| (contentType != null && contentType.contains("text/event-stream"))) { || (contentType != null && contentType.contains("text/event-stream"))
|| ("/api/v1/llm/ask".equals(requestURI))
) {
filterChain.doFilter(request, response); filterChain.doFilter(request, response);
return; return;
} }