diff --git a/multi/multi_gateway-route-filters.html b/multi/multi_gateway-route-filters.html index 65fcfc56..53323acc 100644 --- a/multi/multi_gateway-route-filters.html +++ b/multi/multi_gateway-route-filters.html @@ -27,28 +27,31 @@ uri: http://example.org filters: - AddResponseHeader=X-Response-Foo, Bar
-
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
The Hystrix GatewayFilter Factory takes a single name parameters, which is the name of the HystrixCommand. (More options might be added in future releases).
application.yml. +
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand.
application.yml.
spring: cloud: gateway: routes: - - id: hytstrix_route + - id: hystrix_route uri: http://example.org filters: - Hystrix=myCommandName
-
This wraps the remaining filters in a HystrixCommand with command name myCommandName.
The Hystrix filter takes an optional fallbackUri parameter. Currently, only forward: schemed URIs are supported. If the fallback is called, the request will be forwarded to the controller matched by the URI.
application.yml. +
This wraps the remaining filters in a HystrixCommand with command name myCommandName.
The Hystrix filter can also accept an optional fallbackUri parameter. Currently, only forward: schemed URIs are supported. If the fallback is called, the request will be forwarded to the controller matched by the URI.
application.yml.
spring: cloud: gateway: routes: - - id: hytstrix_route - uri: http://example.org + - id: hystrix_route + uri: lb://backing-service:8088 + predicates: + - Path=/consumingserviceendpoint filters: - name: Hystrix args: name: fallbackcmd - fallbackUri: forward:/fallbackcontroller
-
This will forward to the /fallbackcontroller when the Hystrix fallback is called.
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml. + fallbackUri: forward:/incaseoffailureusethis + - RewritePath=/consumingserviceendpoint, /backingserviceendpoint
+
This will forward to the /incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via the lb prefix on the destination URI.
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml.
spring: cloud: gateway: diff --git a/single/spring-cloud-gateway.html b/single/spring-cloud-gateway.html index 8a083906..538eafd5 100644 --- a/single/spring-cloud-gateway.html +++ b/single/spring-cloud-gateway.html @@ -128,28 +128,31 @@ for details on setting up your build system with the current Spring Cloud Releas uri: http://example.org filters: - AddResponseHeader=X-Response-Foo, Bar
-
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
The Hystrix GatewayFilter Factory takes a single name parameters, which is the name of the HystrixCommand. (More options might be added in future releases).
application.yml. +
This will add X-Response-Foo:Bar header to the downstream response’s headers for all matching requests.
The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of the HystrixCommand.
application.yml.
spring: cloud: gateway: routes: - - id: hytstrix_route + - id: hystrix_route uri: http://example.org filters: - Hystrix=myCommandName
-
This wraps the remaining filters in a HystrixCommand with command name myCommandName.
The Hystrix filter takes an optional fallbackUri parameter. Currently, only forward: schemed URIs are supported. If the fallback is called, the request will be forwarded to the controller matched by the URI.
application.yml. +
This wraps the remaining filters in a HystrixCommand with command name myCommandName.
The Hystrix filter can also accept an optional fallbackUri parameter. Currently, only forward: schemed URIs are supported. If the fallback is called, the request will be forwarded to the controller matched by the URI.
application.yml.
spring: cloud: gateway: routes: - - id: hytstrix_route - uri: http://example.org + - id: hystrix_route + uri: lb://backing-service:8088 + predicates: + - Path=/consumingserviceendpoint filters: - name: Hystrix args: name: fallbackcmd - fallbackUri: forward:/fallbackcontroller
-
This will forward to the /fallbackcontroller when the Hystrix fallback is called.
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml. + fallbackUri: forward:/incaseoffailureusethis + - RewritePath=/consumingserviceendpoint, /backingserviceendpoint
+
This will forward to the /incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via the lb prefix on the destination URI.
The PrefixPath GatewayFilter Factory takes a single prefix parameter.
application.yml.
spring: cloud: gateway: diff --git a/spring-cloud-gateway.xml b/spring-cloud-gateway.xml index 98690d34..11267ceb 100644 --- a/spring-cloud-gateway.xml +++ b/spring-cloud-gateway.xml @@ -308,7 +308,7 @@ for details on setting up your build system with the current Spring Cloud ReleasHystrix GatewayFilter Factory -The Hystrix GatewayFilter Factory takes a single +name parameters, which is the name of theHystrixCommand . (More options might be added in future releases).The Hystrix GatewayFilter Factory requires a single name parameter, which is the name of theHystrixCommand .application.yml @@ -316,14 +316,14 @@ for details on setting up your build system with the current Spring Cloud Releas cloud: gateway: routes: - - id: hytstrix_route + - id: hystrix_route uri: http://example.org filters: - Hystrix=myCommandName This wraps the remaining filters in a -HystrixCommand with command namemyCommandName .The Hystrix filter takes an optional +fallbackUri parameter. Currently, onlyforward: schemed URIs are supported. If the fallback is called, the request will be forwarded to the controller matched by the URI.The Hystrix filter can also accept an optional fallbackUri parameter. Currently, onlyforward: schemed URIs are supported. If the fallback is called, the request will be forwarded to the controller matched by the URI.- application.yml @@ -331,16 +331,19 @@ for details on setting up your build system with the current Spring Cloud Releas cloud: gateway: routes: - - id: hytstrix_route - uri: http://example.org + - id: hystrix_route + uri: lb://backing-service:8088 + predicates: + - Path=/consumingserviceendpoint filters: - name: Hystrix args: name: fallbackcmd - fallbackUri: forward:/fallbackcontroller + fallbackUri: forward:/incaseoffailureusethis + - RewritePath=/consumingserviceendpoint, /backingserviceendpoint This will forward to the +/fallbackcontroller when the Hystrix fallback is called.This will forward to the /incaseoffailureusethis URI when the Hystrix fallback is called. Note that this example also demonstrates (optional) Spring Cloud Netflix Ribbon load-balancing via thelb prefix on the destination URI.PrefixPath GatewayFilter Factory