Skip to main content
The request_size_limiter policy rejects requests whose body exceeds a configured limit, before they’re forwarded upstream — a cheap guard against accidental or abusive oversized prompts. It runs at pre_request.
SettingTypeDefaultNotes
allowed_payload_sizeint10Max body size, in size_unit.
size_unitenummegabytesbytes · kilobytes · megabytes.
max_chars_per_requestint100000Max characters in the request content.
require_content_lengthboolfalseReject requests with no Content-Length.
Run it as a global policy at pre_request to set a gateway-wide ceiling, or scope it to specific consumers for tighter per-tenant limits.