update 优化 gateway 只缓存body

2.X
疯狂的狮子li 2 years ago
parent 81c58650ab
commit 5fe2e56f0b

@ -24,7 +24,7 @@ public class GlobalCacheRequestFilter implements GlobalFilter, Ordered {
if (method == null || method == HttpMethod.GET || method == HttpMethod.DELETE) {
return chain.filter(exchange);
}
return ServerWebExchangeUtils.cacheRequestBodyAndRequest(exchange, (serverHttpRequest) -> {
return ServerWebExchangeUtils.cacheRequestBody(exchange, (serverHttpRequest) -> {
if (serverHttpRequest == exchange.getRequest()) {
return chain.filter(exchange);
}

Loading…
Cancel
Save