diff --git a/spring-cloud-gateway.html b/spring-cloud-gateway.html index d9034890..e508fdda 100644 --- a/spring-cloud-gateway.html +++ b/spring-cloud-gateway.html @@ -111,6 +111,7 @@ $(addBlockSwitches);
  • AddRequestHeader GatewayFilter Factory
  • AddRequestParameter GatewayFilter Factory
  • AddResponseHeader GatewayFilter Factory
  • +
  • DedupeResponseHeader GatewayFilter Factory
  • Hystrix GatewayFilter Factory
  • FallbackHeaders GatewayFilter Factory
  • PrefixPath GatewayFilter Factory
  • @@ -698,7 +699,7 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i cloud: gateway: routes: - - id: add_request_header_route + - id: add_response_header_route uri: http://example.org filters: - AddResponseHeader=X-Response-Foo, Bar @@ -709,6 +710,31 @@ If two hops of trusted infrastructure are required before Spring Cloud Gateway i
    +

    DedupeResponseHeader GatewayFilter Factory

    +
    +

    The DedupeResponseHeader GatewayFilter Factory takes a name parameter and an optional strategy parameter. name can contain a list of header names, space separated.

    +
    +
    +
    application.yml
    +
    +
    spring:
    +  cloud:
    +    gateway:
    +      routes:
    +      - id: dedupe_response_header_route
    +        uri: http://example.org
    +        filters:
    +        - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
    +
    +
    +
    +

    This will remove duplicate values of Access-Control-Allow-Credentials and Access-Control-Allow-Origin response headers in cases when both the gateway CORS logic and the downstream add them.

    +
    +
    +

    The DedupeResponseHeader filter also accepts an optional strategy parameter. The accepted values are RETAIN_FIRST (default), RETAIN_LAST, and RETAIN_UNIQUE.

    +
    +
    +

    Hystrix GatewayFilter Factory

    Hystrix is a library from Netflix that implements the circuit breaker pattern.