From bbe3dccada79ce9b3357fe04522de096e0042ddf Mon Sep 17 00:00:00 2001 From: Toon Geens Date: Thu, 31 Aug 2023 12:02:32 +0200 Subject: [PATCH] route preserveHostHeader --- .../contentgrid/gateway/runtime/RuntimeConfiguration.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/contentgrid/gateway/runtime/RuntimeConfiguration.java b/src/main/java/com/contentgrid/gateway/runtime/RuntimeConfiguration.java index 499473d0..65093526 100644 --- a/src/main/java/com/contentgrid/gateway/runtime/RuntimeConfiguration.java +++ b/src/main/java/com/contentgrid/gateway/runtime/RuntimeConfiguration.java @@ -58,9 +58,9 @@ RouteLocator customRouteLocator(RouteLocatorBuilder builder, RuntimeRequestResol return builder.routes() .route(r -> r .predicate(exchange -> requestResolver.resolveDeploymentId(exchange).isPresent()) - .filters(f -> - f.addResponseHeader("X-CG-Routed", "w00t")) - + .filters(f -> f + .addResponseHeader("X-CG-Routed", "w00t") + .preserveHostHeader()) .uri("cg://ignored") )