Browse Source

remove commented out code

pull/212/head
Spencer Gibb 7 years ago
parent
commit
eaaf9de4da
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 19
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/PreserveHostHeaderGatewayFilterFactory.java

19
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/PreserveHostHeaderGatewayFilterFactory.java

@ -38,23 +38,4 @@ public class PreserveHostHeaderGatewayFilterFactory implements GatewayFilterFact @@ -38,23 +38,4 @@ public class PreserveHostHeaderGatewayFilterFactory implements GatewayFilterFact
return chain.filter(exchange);
};
}
/*public static class RequestMutator implements ProxyRequestMutator<HttpClientRequest> {
@Override
public void mutate(ServerWebExchange exchange, HttpClientRequest request) {
boolean preserveHost = exchange.getAttributeOrDefault(PRESERVE_HOST_HEADER_ATTRIBUTE, false);
if (preserveHost) {
String host = exchange.getRequest().getHeaders().getFirst(HttpHeaders.HOST);
if (StringUtils.isEmpty(host)) {
List<String> hosts = exchange.getAttribute(ORIGINAL_HOST_HEADER_ATTRIBUTE);
if (!CollectionUtils.isEmpty(hosts)) {
host = hosts.get(0);
}
}
if (!StringUtils.isEmpty(host)) {
request.header(HttpHeaders.HOST, host);
}
}
}
}*/
}

Loading…
Cancel
Save