From f6182dfa03198348fcd1738d4b296be492eaff13 Mon Sep 17 00:00:00 2001 From: sgibb Date: Fri, 8 Mar 2024 15:43:42 -0500 Subject: [PATCH] Updates documentation to correct RewriteLocationResponseHeaderGatewayFilterFactory parameters and default value Fixes #2753 Co-authored-by: ice2shell --- .../rewritelocationresponseheader-factory.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/modules/ROOT/pages/spring-cloud-gateway/gatewayfilter-factories/rewritelocationresponseheader-factory.adoc b/docs/modules/ROOT/pages/spring-cloud-gateway/gatewayfilter-factories/rewritelocationresponseheader-factory.adoc index 3d7cf8ef08..c087d4123e 100644 --- a/docs/modules/ROOT/pages/spring-cloud-gateway/gatewayfilter-factories/rewritelocationresponseheader-factory.adoc +++ b/docs/modules/ROOT/pages/spring-cloud-gateway/gatewayfilter-factories/rewritelocationresponseheader-factory.adoc @@ -2,7 +2,7 @@ = `RewriteLocationResponseHeader` `GatewayFilter` Factory The `RewriteLocationResponseHeader` `GatewayFilter` factory modifies the value of the `Location` response header, usually to get rid of backend-specific details. -It takes the `stripVersionMode`, `locationHeaderName`, `hostValue`, and `protocolsRegex` parameters. +It takes the `Mode`, `locationHeaderName`, `hostValue`, and `protocols` parameters. The following listing configures a `RewriteLocationResponseHeader` `GatewayFilter`: .application.yml @@ -20,7 +20,7 @@ spring: For example, for a request of `POST https://api.example.com/some/object/name`, the `Location` response header value of `https://object-service.prod.example.net/v2/some/object/id` is rewritten as `https://api.example.com/some/object/id`. -The `stripVersionMode` parameter has the following possible values: `NEVER_STRIP`, `AS_IN_REQUEST` (default), and `ALWAYS_STRIP`. +The `Mode` parameter has the following possible values: `NEVER_STRIP`, `AS_IN_REQUEST` (default), and `ALWAYS_STRIP`. * `NEVER_STRIP`: The version is not stripped, even if the original request path contains no version. * `AS_IN_REQUEST`: The version is stripped only if the original request path contains no version. @@ -29,7 +29,7 @@ The `stripVersionMode` parameter has the following possible values: `NEVER_STRIP The `hostValue` parameter, if provided, is used to replace the `host:port` portion of the response `Location` header. If it is not provided, the value of the `Host` request header is used. -The `protocolsRegex` parameter must be a valid regex `String`, against which the protocol name is matched. +The `protocols` parameter must be a valid regex `String`, against which the protocol name is matched. If it is not matched, the filter does nothing. -The default is `http|https|ftp|ftps`. +The default is `https?|ftps?`.