request_body
Manipulates or sets restrictions on the bodies of incoming requests.
Syntax
request_body [<matcher>] {
max_size <value>
}
-
max_size is the maximum size in bytes allowed for the request body. It accepts all size values supported by go-humanize. Reads of more bytes will return an error with HTTP status
413.
Examples
Limit request body sizes to 10 megabytes:
example.com {
request_body {
max_size 10MB
}
reverse_proxy localhost:8080
}
© 2015-2025 Matthew Holt and The Caddy Authors
Licensed under the Apache License 2.0.
Caddy is a registered trademark of Stack Holdings GmbH.
https://caddyserver.com/docs/caddyfile/directives/request_body