From adf90c2dcd4a8dbe20ab458bf48e30d4ed7d0ab1 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 13 Dec 2019 19:18:29 +0000 Subject: [PATCH] Sync docs from 2.1.x to gh-pages --- 2.1.x/multi/multi_gateway-request-predicates-factories.html | 6 +++--- 2.1.x/single/spring-cloud-gateway.html | 6 +++--- 2.1.x/spring-cloud-gateway.xml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) 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

4.7 Method Route Predicate Factory

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

4.7 Method Route Predicate Factory

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.

4.8 Path Route Predicate Factory

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.

4.8 Path Route Predicate Factory

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: 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

4.7 Method Route Predicate Factory

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

4.7 Method Route Predicate Factory

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.

- id: method_route uri: https://example.org predicates: - - Method=GET

-

This route would match if the request method was a GET.

4.8 Path Route Predicate Factory

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.

4.8 Path Route Predicate Factory

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 a POST.
Path Route Predicate Factory