mirror of
https://github.com/caddyserver/website.git
synced 2025-04-28 16:06:17 -04:00
Big Caddyfile docs update (#374)
This commit is contained in:
parent
3ec3033602
commit
22301d6a81
34 changed files with 1732 additions and 512 deletions
|
@ -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
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue