过滤器替换域名1

This commit is contained in:
2025-06-16 16:40:28 +08:00
parent 07e09ae405
commit 708c96092b

View File

@@ -22,7 +22,7 @@ public class CustomResponseFilter implements Filter {
chain.doFilter(request, responseWrapper);
byte[] responseArray = responseWrapper.getContentAsByteArray();
String responseStr = new String(responseArray, responseWrapper.getCharacterEncoding());
String responseStr = new String(responseArray, "UTF-8");
// 在这里处理响应内容
String modifiedResponse = modifyResponse(responseStr);