Request Content Limit policy
You can use the request-content-limit policy to specify the maximum allowed request content length. The policy defines this limit in bytes and compares it to thecontent-length header of the incoming request.
If you use this policy and the request lacks a content-length header, the policy rejects the call unless the request also has a non-empty transfer-encoding header.
Timing
Configuration
| Property | Required | Description | Type | Default |
|---|
limit | yes | Maximum length of request content allowed, specified in bytes. | integer | |
Example
"request-content-limit": {
"limit": 1000
}
Errors
| Code | Message |
|---|
400 | The limit from the configuration is not correct. |
413 | Incoming HTTP request payload exceeds the size limit. |
411 | The HTTP request is not chunked and does not specify the Content-Length header. |