From af8da9eb836ea71f8d5a8347fd1b974bb945960f Mon Sep 17 00:00:00 2001 From: eacdy Date: Tue, 13 Aug 2019 16:23:55 +0800 Subject: [PATCH 1/2] FIX the wrong description in doc for "RewritePath GatewayFilter Factory" --- docs/src/main/asciidoc/spring-cloud-gateway.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/spring-cloud-gateway.adoc b/docs/src/main/asciidoc/spring-cloud-gateway.adoc index 53816cd7..a690b57d 100644 --- a/docs/src/main/asciidoc/spring-cloud-gateway.adoc +++ b/docs/src/main/asciidoc/spring-cloud-gateway.adoc @@ -857,7 +857,7 @@ spring: - RewritePath=/foo/(?.*), /$\{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. +For a request path of `/foo/bar`, this will set the path to `/bar` before making the downstream request. Notice the `$` Should be replaced with `$\` because of the YAML spec. === RewriteLocationResponseHeader GatewayFilter Factory 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. From ed018747936e83a75e583d33c12691fd6a182437 Mon Sep 17 00:00:00 2001 From: eacdy Date: Tue, 13 Aug 2019 16:27:07 +0800 Subject: [PATCH 2/2] Fix wrong indentation in the document. --- docs/src/main/asciidoc/spring-cloud-gateway.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/main/asciidoc/spring-cloud-gateway.adoc b/docs/src/main/asciidoc/spring-cloud-gateway.adoc index a690b57d..6f013643 100644 --- a/docs/src/main/asciidoc/spring-cloud-gateway.adoc +++ b/docs/src/main/asciidoc/spring-cloud-gateway.adoc @@ -1159,13 +1159,13 @@ spring: gateway: routes: - id: request_size_route - uri: http://localhost:8080/upload - predicates: - - Path=/upload - filters: - - name: RequestSize - args: - maxSize: 5000000 + uri: http://localhost:8080/upload + predicates: + - Path=/upload + filters: + - name: RequestSize + args: + maxSize: 5000000 ---- The RequestSize GatewayFilter Factory set the response status as `413 Payload Too Large` with a additional header `errorMessage` when the Request is rejected due to size. Following is an example of such an `errorMessage` .