Big Caddyfile docs update (#374)

This commit is contained in:
Francis Lavoie 2024-02-20 06:49:30 -05:00 committed by GitHub
parent 3ec3033602
commit 22301d6a81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 1732 additions and 512 deletions

View file

@ -11,19 +11,22 @@ Manipulates or sets restrictions on the bodies of incoming requests.
```caddy-d
request_body [<matcher>] {
max_size <value>
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](https://pkg.go.dev/github.com/dustin/go-humanize#pkg-constants). Reads of more bytes will return an error with HTTP status 413.
- **max_size** is the maximum size in bytes allowed for the request body. It accepts all size values supported by [go-humanize](https://pkg.go.dev/github.com/dustin/go-humanize#pkg-constants). Reads of more bytes will return an error with HTTP status `413`.
## Examples
Limit request body sizes to 10 megabytes:
```caddy-d
request_body {
max_size 10MB
```caddy
example.com {
request_body {
max_size 10MB
}
reverse_proxy localhost:8080
}
```