diff --git a/2.1.x/multi/multi_gateway-request-predicates-factories.html b/2.1.x/multi/multi_gateway-request-predicates-factories.html index 4b88635c..fb66b8d8 100644 --- a/2.1.x/multi/multi_gateway-request-predicates-factories.html +++ b/2.1.x/multi/multi_gateway-request-predicates-factories.html @@ -54,7 +54,7 @@ uri: https://example.org predicates: - Host=**.somehost.org,**.anotherhost.org
-
URI template variables are supported as well, such as {sub}.myhost.org.
This route would match if the request has a Host header has the value www.somehost.org or beta.somehost.org or www.anotherhost.org.
This predicate extracts the URI template variables (like sub defined in the example above) as a map of names and values and places it in the ServerWebExchange.getAttributes() with a key defined in ServerWebExchangeUtils.URI_TEMPLATE_VARIABLES_ATTRIBUTE. Those values are then available for use by GatewayFilter Factories
The Method Route Predicate Factory takes one parameter: the HTTP method to match.
application.yml. +
URI template variables are supported as well, such as {sub}.myhost.org.
This route would match if the request has a Host header has the value www.somehost.org or beta.somehost.org or www.anotherhost.org.
This predicate extracts the URI template variables (like sub defined in the example above) as a map of names and values and places it in the ServerWebExchange.getAttributes() with a key defined in ServerWebExchangeUtils.URI_TEMPLATE_VARIABLES_ATTRIBUTE. Those values are then available for use by GatewayFilter Factories
The Method Route Predicate Factory takes one or more parameters: the HTTP methods to match.
application.yml.
spring: cloud: gateway: @@ -62,8 +62,8 @@ - id: method_route uri: https://example.org predicates: - - Method=GET
-
This route would match if the request method was a GET.
The Path Route Predicate Factory takes two parameter: a list of Spring PathMatcher patterns and an optional flag to matchOptionalTrailingSeparator.
application.yml. + - Method=GET,POST
+
This route would match if the request method was a GET or a POST.
The Path Route Predicate Factory takes two parameter: a list of Spring PathMatcher patterns and an optional flag to matchOptionalTrailingSeparator.
application.yml.
spring: cloud: gateway: diff --git a/2.1.x/single/spring-cloud-gateway.html b/2.1.x/single/spring-cloud-gateway.html index d1a977e3..334dcf24 100644 --- a/2.1.x/single/spring-cloud-gateway.html +++ b/2.1.x/single/spring-cloud-gateway.html @@ -62,7 +62,7 @@ working with Spring Cloud Gateway.
-
URI template variables are supported as well, such as {sub}.myhost.org.
This route would match if the request has a Host header has the value www.somehost.org or beta.somehost.org or www.anotherhost.org.
This predicate extracts the URI template variables (like sub defined in the example above) as a map of names and values and places it in the ServerWebExchange.getAttributes() with a key defined in ServerWebExchangeUtils.URI_TEMPLATE_VARIABLES_ATTRIBUTE. Those values are then available for use by GatewayFilter Factories
The Method Route Predicate Factory takes one parameter: the HTTP method to match.
application.yml. +
URI template variables are supported as well, such as {sub}.myhost.org.
This route would match if the request has a Host header has the value www.somehost.org or beta.somehost.org or www.anotherhost.org.
This predicate extracts the URI template variables (like sub defined in the example above) as a map of names and values and places it in the ServerWebExchange.getAttributes() with a key defined in ServerWebExchangeUtils.URI_TEMPLATE_VARIABLES_ATTRIBUTE. Those values are then available for use by GatewayFilter Factories
The Method Route Predicate Factory takes one or more parameters: the HTTP methods to match.
application.yml.
spring: cloud: gateway: @@ -70,8 +70,8 @@ working with Spring Cloud Gateway.
-
This route would match if the request method was a GET.
The Path Route Predicate Factory takes two parameter: a list of Spring PathMatcher patterns and an optional flag to matchOptionalTrailingSeparator.
application.yml. + - Method=GET,POST
+
This route would match if the request method was a GET or a POST.
The Path Route Predicate Factory takes two parameter: a list of Spring PathMatcher patterns and an optional flag to matchOptionalTrailingSeparator.
application.yml.
spring: cloud: gateway: diff --git a/2.1.x/spring-cloud-gateway.xml b/2.1.x/spring-cloud-gateway.xml index 20ea9f6a..44724fcd 100644 --- a/2.1.x/spring-cloud-gateway.xml +++ b/2.1.x/spring-cloud-gateway.xml @@ -174,7 +174,7 @@ working with Spring Cloud Gateway.Method Route Predicate Factory -The Method Route Predicate Factory takes one parameter: the HTTP method to match. +The Method Route Predicate Factory takes one or more parameters: the HTTP methods to match. - application.yml @@ -185,10 +185,10 @@ working with Spring Cloud Gateway. - id: method_route uri: https://example.org predicates: - - Method=GET + - Method=GET,POST This route would match if the request method was a +GET .This route would match if the request method was a GET or aPOST .Path Route Predicate Factory