过滤器替换域名1

This commit is contained in:
2025-06-16 16:40:28 +08:00
parent 404c8ce9f7
commit 407b9f1a65

View File

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