diff --git a/2.1.x/multi/multi__gatewayfilter_factories.html b/2.1.x/multi/multi__gatewayfilter_factories.html index d91a332a..33607b72 100644 --- a/2.1.x/multi/multi__gatewayfilter_factories.html +++ b/2.1.x/multi/multi__gatewayfilter_factories.html @@ -248,7 +248,7 @@ and have it applied to all routes.
+ - RewritePath=/foo(?<segment>/?.*), $\{segment}
For a request path of /foo/bar, this will set the path to /bar before making the downstream request. Notice the $\ which is replaced with $ because of the YAML spec.
The RewriteLocationResponseHeader GatewayFilter Factory modifies the value of Location response header, usually to get rid of backend specific details. It takes stripVersionMode, locationHeaderName, hostValue, and protocolsRegex parameters.
application.yml.
spring: cloud: diff --git a/2.1.x/single/spring-cloud-gateway.html b/2.1.x/single/spring-cloud-gateway.html index 94670dbb..487ff34b 100644 --- a/2.1.x/single/spring-cloud-gateway.html +++ b/2.1.x/single/spring-cloud-gateway.html @@ -373,7 +373,7 @@ and have it applied to all routes.
+ - RewritePath=/foo(?<segment>/?.*), $\{segment}
For a request path of /foo/bar, this will set the path to /bar before making the downstream request. Notice the $\ which is replaced with $ because of the YAML spec.
The RewriteLocationResponseHeader GatewayFilter Factory modifies the value of Location response header, usually to get rid of backend specific details. It takes stripVersionMode, locationHeaderName, hostValue, and protocolsRegex parameters.
application.yml.
spring: cloud: diff --git a/2.1.x/spring-cloud-gateway.xml b/2.1.x/spring-cloud-gateway.xml index a915331a..f69f6eb2 100644 --- a/2.1.x/spring-cloud-gateway.xml +++ b/2.1.x/spring-cloud-gateway.xml @@ -4,7 +4,7 @@Spring Cloud Gateway -2019-09-15 +2019-09-16 @@ -821,7 +821,7 @@ and have it applied to all routes. predicates: - Path=/foo/** filters: - - RewritePath=/foo/(?<segment>.*), /$\{segment} + - RewritePath=/foo(?<segment>/?.*), $\{segment} For a request path of /foo/bar , this will set the path to/bar before making the downstream request. Notice the$\ which is replaced with$ because of the YAML spec.