From 48ebc3e1120c4d72ea490167b9705208edc79071 Mon Sep 17 00:00:00 2001
From: cl <1442464845@qq.com>
Date: 星期一, 20 四月 2026 12:03:58 +0800
Subject: [PATCH] dj修改

---
 rsf-server/src/main/java/com/vincent/rsf/server/common/security/JwtAuthenticationFilter.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/common/security/JwtAuthenticationFilter.java b/rsf-server/src/main/java/com/vincent/rsf/server/common/security/JwtAuthenticationFilter.java
index 5b3917d..e909f56 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/common/security/JwtAuthenticationFilter.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/common/security/JwtAuthenticationFilter.java
@@ -56,9 +56,12 @@
     @Override
     protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
         String access_token = JwtUtil.getAccessToken(request);
+        // FILTER_PATH 鍚� /wcs/** 鏃朵細娓呯┖ token锛涚┖鏉垮嚭搴撻〉闇�甯� JWT 鍋� @PreAuthorize锛屾晠 /wcs/empty/** 淇濈暀 token
+        String servletPath = request.getServletPath();
+        boolean keepWcsEmptyJwt = servletPath != null && servletPath.startsWith("/wcs/empty");
         for (String filterPath : SecurityConfig.FILTER_PATH) {
             AntPathRequestMatcher antPathMatcher = new AntPathRequestMatcher(filterPath);
-            if (antPathMatcher.matches(request)) {
+            if (antPathMatcher.matches(request) && !keepWcsEmptyJwt) {
                 access_token = "";
             }
         }

--
Gitblit v1.9.1