fix
This commit is contained in:
parent
1236799852
commit
1231f0c826
@ -34,7 +34,7 @@ public class AuthFilter implements Filter {
|
||||
|
||||
// 需要鉴权的路径前缀
|
||||
if (path.startsWith("/api/v1/doc")
|
||||
// || path.startsWith("/api/v1/llm")
|
||||
|| path.startsWith("/api/v1/llm")
|
||||
) {
|
||||
String token = request.getHeader("Authorization");
|
||||
|
||||
|
||||
@ -47,8 +47,12 @@ public class LogFilter extends OncePerRequestFilter {
|
||||
ContentCachingResponseWrapper responseWrapper = new ContentCachingResponseWrapper(response);
|
||||
String accept = request.getHeader("Accept");
|
||||
String contentType = response.getContentType();
|
||||
String requestURI = requestWrapper.getRequestURI();
|
||||
logger.info("requestURI: " + requestURI);
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user