|
@@ -73,7 +73,6 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
|
|
|
// 请求方法
|
|
// 请求方法
|
|
|
HttpMethod method = request.getMethod();
|
|
HttpMethod method = request.getMethod();
|
|
|
if (method == HttpMethod.GET) {
|
|
if (method == HttpMethod.GET) {
|
|
|
- // 1 修改请求参数,并获取请求参数
|
|
|
|
|
return decryptGetRequestParam(exchange, chain);
|
|
return decryptGetRequestParam(exchange, chain);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -81,7 +80,6 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
|
|
|
return decryptPostBodyParam(exchange, chain);
|
|
return decryptPostBodyParam(exchange, chain);
|
|
|
}
|
|
}
|
|
|
if (method == HttpMethod.DELETE) {
|
|
if (method == HttpMethod.DELETE) {
|
|
|
- // 1 修改请求参数,并获取请求参数
|
|
|
|
|
return decryptDeleteRequestParam(exchange, chain);
|
|
return decryptDeleteRequestParam(exchange, chain);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -91,6 +89,13 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 解密删除请求参数
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param exchange 交换
|
|
|
|
|
+ * @param chain 链
|
|
|
|
|
+ * @return {@link Mono}<{@link Void}>
|
|
|
|
|
+ */
|
|
|
private Mono<Void> decryptDeleteRequestParam(ServerWebExchange exchange, GatewayFilterChain chain) {
|
|
private Mono<Void> decryptDeleteRequestParam(ServerWebExchange exchange, GatewayFilterChain chain) {
|
|
|
|
|
|
|
|
ServerHttpRequest request = exchange.getRequest();
|
|
ServerHttpRequest request = exchange.getRequest();
|