request_size_limiter
plugin enforces strict request size boundaries for incoming HTTP requests to protect services from oversized payloads, abuse, and resource exhaustion.
Request Part | Description | Default |
---|---|---|
Headers | Total headers size | 8KB |
Body | Request body size | 1MB |
URL | URL length | 2KB |
Header Count | Number of headers | 100 |
Parameter | Type | Description | Required | Default |
---|---|---|---|---|
max_header_size | number | Maximum headers size in bytes | No | 8192 |
max_body_size | number | Maximum body size in bytes | No | 1048576 |
max_url_length | number | Maximum URL length in bytes | No | 2048 |
max_header_count | number | Maximum number of headers | No | 100 |
error_message | string | Custom error message | No | ”Request size exceeds limit” |
Content-Length
header.
Parameter | Type | Description | Default |
---|---|---|---|
allowed_payload_size | number | Payload size threshold (unit configurable) | 10MB |
size_unit | string | Size unit: bytes , kilobytes , or megabytes | megabytes |
max_chars_per_request | number | Max allowed characters per request | 100,000 |
require_content_length | boolean | Whether Content-Length header must be present | false |
Header Name | Description |
---|---|
X-Request-Size-Bytes | Actual request size in bytes |
X-Request-Size-Chars | Number of characters in the request |
X-Size-Limit-Bytes | Configured max size limit in bytes |
X-Size-Limit-Chars | Configured max character count limit |
413 Payload Too Large
when limits are exceededContent-Length