From 2ae1b6d9c35eedaebd1d428ef5df0fedc688e0cb Mon Sep 17 00:00:00 2001 From: wangguangyuan Date: Wed, 18 Jun 2025 09:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=B7=BB=E5=8A=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=A4=A7=E8=AF=B7=E6=B1=82=E6=95=B0=E6=8D=AE=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E4=B8=8D=E8=BF=9B=E8=A1=8C=E7=BC=93=E5=86=B2?= =?UTF-8?q?=E5=8C=BA=E7=BC=93=E5=86=B2=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=BC=A0?= =?UTF-8?q?=E9=80=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspect/gateway/filter/RequestParamGlobalFilter.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java b/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java index d8f2519..44ca55a 100644 --- a/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java +++ b/inspect-gateway/src/main/java/com/inspect/gateway/filter/RequestParamGlobalFilter.java @@ -31,7 +31,14 @@ public class RequestParamGlobalFilter implements GlobalFilter, Ordered { HttpHeaders headers = request.getHeaders(); MediaType contentType = headers.getContentType(); long contentLength = headers.getContentLength(); - return contentLength <= 0L || !MediaType.APPLICATION_JSON.equals(contentType) && !MediaType.APPLICATION_JSON_UTF8.equals(contentType) ? chain.filter(exchange) : this.readBody(exchange, chain); + final String uriPath = request.getURI().getPath(); + return contentLength <= 0L + || !MediaType.APPLICATION_JSON.equals(contentType) && !MediaType.APPLICATION_JSON_UTF8.equals(contentType) + || uriPath.contains("/task/add") + || uriPath.contains("/task/save") + ? + chain.filter(exchange) : + this.readBody(exchange, chain); } private Mono readBody(ServerWebExchange exchange, GatewayFilterChain chain) {