From eaaf9de4daca75c7e7a92c5956fa9792ff42a512 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Tue, 27 Feb 2018 13:09:59 -0500 Subject: [PATCH] remove commented out code --- ...reserveHostHeaderGatewayFilterFactory.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/PreserveHostHeaderGatewayFilterFactory.java b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/PreserveHostHeaderGatewayFilterFactory.java index 3a2d360c7..14f8e2f5d 100644 --- a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/PreserveHostHeaderGatewayFilterFactory.java +++ b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/factory/PreserveHostHeaderGatewayFilterFactory.java @@ -38,23 +38,4 @@ public class PreserveHostHeaderGatewayFilterFactory implements GatewayFilterFact return chain.filter(exchange); }; } - - /*public static class RequestMutator implements ProxyRequestMutator { - @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 hosts = exchange.getAttribute(ORIGINAL_HOST_HEADER_ATTRIBUTE); - if (!CollectionUtils.isEmpty(hosts)) { - host = hosts.get(0); - } - } - if (!StringUtils.isEmpty(host)) { - request.header(HttpHeaders.HOST, host); - } - } - } - }*/ }