-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: request_body Caddyfile directive (#104)
* Add documentation about request_body directive in Caddyfile * Add note about matchers support Co-authored-by: Francis Lavoie <lavofr@gmail.com> * Improve description of max_size parameter Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * Improve text Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * Improve description of request_body directive Co-authored-by: Matt Holt <mholt@users.noreply.github.com> Co-authored-by: Francis Lavoie <lavofr@gmail.com> Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
- Loading branch information
1 parent
6b4998a
commit caefac9
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: request_body (Caddyfile directive) | ||
--- | ||
|
||
# request_body | ||
|
||
Manipulates or sets restrictions on the bodies of incoming requests. | ||
|
||
|
||
## Syntax | ||
|
||
```caddy-d | ||
request_body [<matcher>] { | ||
max_size <value> | ||
} | ||
``` | ||
|
||
- **max_size** is the maximum size in bytes allowed for the request body. It accepts all formats supported by [go-humanize](https://github.com/dustin/go-humanize/blob/master/bytes.go). | ||
|
||
|
||
## Examples | ||
|
||
Limit request body sizes to 10 megabytes: | ||
|
||
```caddy-d | ||
request_body { | ||
max_size 10MB | ||
} | ||
``` |