if("get".equalsIgnoreCase(method)){
Enumeration<String> params = request.getParameterNames();
LinkedHashSet<String> queryParam = new LinkedHashSet<>();
while(params.hasMoreElements()){
String key = param.nextElement();
if(StringUtils.isNotBlank(key)){
queryParam.add(URLEncoder.encode(key,"UTF-8")+"="+URLEncoder.encode(request.getParameter(key),"UTF-8"))
}
}
url = request.getRequestURI()+"?"+request.getQueryString();
}
1.响应头移除
CloseableHttpResponse proxyRes
res.removeHeaders("Server");
res.removeHeaders("Connection");
res.removeHeaders("Set-Cookie");
res.removeHeaders("Transfer-Encoding");
2.请求头移除
cookie,host,connection