From f10276238b492ca4e3c3c8b0b2f72a41b5537af7 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 27 Nov 2024 20:18:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=A0=87=E8=AF=86=E5=88=A4=E6=96=AD=E8=AE=BF?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/wfc/gateway/filter/AuthFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfc-gateway/src/main/java/org/wfc/gateway/filter/AuthFilter.java b/wfc-gateway/src/main/java/org/wfc/gateway/filter/AuthFilter.java index bcdaaea..5aec25a 100644 --- a/wfc-gateway/src/main/java/org/wfc/gateway/filter/AuthFilter.java +++ b/wfc-gateway/src/main/java/org/wfc/gateway/filter/AuthFilter.java @@ -74,7 +74,7 @@ public class AuthFilter implements GlobalFilter, Ordered return unauthorizedResponse(exchange, "令牌验证失败"); } String platform = JwtUtils.getUserPlatform(claims); - if (StringUtils.isEmpty(platform) || !StringUtils.startsWith(url,"/u")) + if ("user".equals(platform) && !StringUtils.startsWith(url,"/u")) { return unauthorizedResponse(exchange, "用户平台禁止访问"); }