From b8359b134e6618b154c79f4e24e700bc4affe424 Mon Sep 17 00:00:00 2001
From: cl <1442464845@qq.com>
Date: 星期五, 17 四月 2026 15:18:20 +0800
Subject: [PATCH] 视图兼容
---
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