spring:
+ cloud:
+ gateway:
+ routes:
+ - id: dedupe_response_header_route
+ uri: http://example.org
+ filters:
+ - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
+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);
The DedupeResponseHeader GatewayFilter Factory takes a name parameter and an optional strategy parameter. name can contain a list of header names, space separated.
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 is a library from Netflix that implements the circuit breaker pattern.