requestsize policy rejects requests whose body exceeds a configured limit, before
they’re forwarded upstream — a cheap guard against accidental or abusive oversized prompts.
| Setting | Type | Default | Notes |
|---|---|---|---|
allowed_payload_size | int | 10 | Max body size, in size_unit. |
size_unit | enum | megabytes | bytes · kilobytes · megabytes. |
max_chars_per_request | int | 100000 | Max characters in the request content. |
require_content_length | bool | false | Reject requests with no Content-Length. |
global policy at pre_request to set a
gateway-wide ceiling, or scope it to specific consumers for tighter per-tenant limits.