diff --git a/src/main/java/com/jiaruiblog/filter/JwtFilter.java b/src/main/java/com/jiaruiblog/filter/JwtFilter.java index 843e9be..8c543f9 100644 --- a/src/main/java/com/jiaruiblog/filter/JwtFilter.java +++ b/src/main/java/com/jiaruiblog/filter/JwtFilter.java @@ -44,7 +44,7 @@ public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) response.setCharacterEncoding("UTF-8"); String url = request.getRequestURI().substring(request.getContextPath().length()); // 登录和注册等请求不需要令牌 - if (url.contains("login") || url.contains("/user/insert") || url.contains("files")) { + if (url.contains("login") || url.contains("/user/insert") || url.contains("/files/view")) { response.setStatus(HttpServletResponse.SC_OK); chain.doFilter(request, response); return;