From f42f0361d33a7604be650758e92944676426ef7d Mon Sep 17 00:00:00 2001 From: Jarrett <291979254@qq.com> Date: Wed, 31 Jul 2024 23:23:07 +0800 Subject: [PATCH] fix: file view bug --- src/main/java/com/jiaruiblog/filter/JwtFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;