Merge branch '3.1.x'
This commit is contained in:
@@ -1143,6 +1143,29 @@ spring:
|
||||
|
||||
This will remove the `red` parameter before it is sent downstream.
|
||||
|
||||
=== `RequestHeaderSize` `GatewayFilter` Factory
|
||||
|
||||
The `RequestHeaderSize` `GatewayFilter` factory takes `maxSize` and `errorHeaderName` parameters.
|
||||
The `maxSize` parameter is the maximum data size allowed of the request header (incuding key and value). The `errorHeaderName` parameter sets the name of the response header containing an error message, by default it is "errorMessage".
|
||||
The following listing configures a `RequestHeaderSize` `GatewayFilter`:
|
||||
|
||||
.application.yml
|
||||
====
|
||||
[source,yaml]
|
||||
----
|
||||
spring:
|
||||
cloud:
|
||||
gateway:
|
||||
routes:
|
||||
- id: requestheadersize_route
|
||||
uri: https://example.org
|
||||
filters:
|
||||
- RequestHeaderSize=1000B
|
||||
----
|
||||
====
|
||||
|
||||
This will send a status 431 if size of any request header is greater than 1000 Bytes.
|
||||
|
||||
=== The `RewritePath` `GatewayFilter` Factory
|
||||
|
||||
The `RewritePath` `GatewayFilter` factory takes a path `regexp` parameter and a `replacement` parameter.
|
||||
|
||||
Reference in New Issue
Block a user