|
|
@@ -105,7 +105,7 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
|
|
|
try{
|
|
|
String[] pathSegments = path.split("/");
|
|
|
String param = pathSegments[pathSegments.length - 1];
|
|
|
- byte[] decode = Base64.getDecoder().decode(param);
|
|
|
+ byte[] decode = Base64.getMimeDecoder().decode(param);
|
|
|
String decryptStr = cryptoAes.decryptStr(new String(decode));
|
|
|
|
|
|
Pattern pattern = Pattern.compile("(.+/)[^/]+$");
|
|
|
@@ -141,10 +141,10 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
|
|
|
Flux<DataBuffer> modifiedBody = serverRequest.bodyToFlux(String.class).flatMap(body -> {
|
|
|
// 解密请求体
|
|
|
try {
|
|
|
- log.info("待解密请求参数:{}", body);
|
|
|
+// log.info("待解密请求参数:{}", body);
|
|
|
byte[] decode = Base64.getMimeDecoder().decode(body);
|
|
|
String decryptStr = cryptoAes.decryptStr(new String(decode));
|
|
|
- log.info("解密后参数:{}", decryptStr);
|
|
|
+// log.info("解密后参数:{}", decryptStr);
|
|
|
|
|
|
DataBufferFactory dataBufferFactory = exchange.getResponse().bufferFactory();
|
|
|
DataBuffer bodyDataBuffer = dataBufferFactory.wrap(decryptStr.getBytes());
|
|
|
@@ -196,7 +196,7 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
|
|
|
if (CharSequenceUtil.isEmpty(decryptedParam)) {
|
|
|
return chain.filter(exchange);
|
|
|
}
|
|
|
- byte[] decode = Base64.getDecoder().decode(decryptedParam);
|
|
|
+ byte[] decode = Base64.getMimeDecoder().decode(decryptedParam);
|
|
|
// log.info("GET:{},请求待解密数据 :{}", exchange.getRequest().getURI(),decryptedParam);
|
|
|
String decryptStr = cryptoAes.decryptStr(new String(decode));
|
|
|
// log.info("GET解密后数据 :{}", decryptStr);
|