From 5b8cf9701fa1324936b4f92d8c627c749d2a8b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=89=E9=80=9F=E8=9C=97=E7=89=9B?= <361946749@qq.com> Date: Mon, 13 Jun 2022 10:12:38 +0000 Subject: [PATCH] =?UTF-8?q?update=20ruoyi-gateway/src/main/java/com/ruoyi/?= =?UTF-8?q?gateway/filter/XssFilter.java.=20update=20=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?XssFilter=20=E4=BD=BF=E7=94=A8=E6=9E=9A=E4=B8=BE=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/gateway/filter/XssFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java index 773aa5580..bc93e3a81 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java @@ -44,7 +44,7 @@ public class XssFilter implements GlobalFilter, Ordered ServerHttpRequest request = exchange.getRequest(); // GET DELETE 不过滤 HttpMethod method = request.getMethod(); - if (method == null || method.matches("GET") || method.matches("DELETE")) + if (method == null || method == HttpMethod.GET || method == HttpMethod.DELETE) { return chain.filter(exchange); }