Browse Source

Proposal to clarify in the docs that request size filter acts on Content-Length header (#3085)

* Update RequestSizeGatewayFilterFactory.java

* Update GatewayFilterSpec.java
main
Alexej Timonin 11 months ago committed by GitHub
parent
commit
beb688fd45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/RequestSizeGatewayFilterFactory.java
  2. 4
      spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java

3
spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/RequestSizeGatewayFilterFactory.java

@ -30,7 +30,8 @@ import org.springframework.web.server.ServerWebExchange; @@ -30,7 +30,8 @@ import org.springframework.web.server.ServerWebExchange;
import static org.springframework.cloud.gateway.support.GatewayToStringStyler.filterToStringCreator;
/**
* This filter blocks the request, if the request size is more than the permissible size.
* This filter blocks the request if the size in Content-Length header value is more than the permissible size.
* Has no effect if Content-Length header is missing.
* The default request size is 5 MB.
*
* @author Arpan

4
spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java

@ -817,7 +817,7 @@ public class GatewayFilterSpec extends UriSpec { @@ -817,7 +817,7 @@ public class GatewayFilterSpec extends UriSpec {
}
/**
* A filter that sets the maximum permissible size of a Request.
* A filter that sets the maximum permissible size of a Content-Length header value in the Request.
* @param size the maximum size of a request
* @return a {@link GatewayFilterSpec} that can be used to apply additional filters
*/
@ -826,7 +826,7 @@ public class GatewayFilterSpec extends UriSpec { @@ -826,7 +826,7 @@ public class GatewayFilterSpec extends UriSpec {
}
/**
* A filter that sets the maximum permissible size of a Request.
* A filter that sets the maximum permissible size of a Content-Length header value in the Request.
* @param size the maximum size of a request
* @return a {@link GatewayFilterSpec} that can be used to apply additional filters
*/

Loading…
Cancel
Save