mirror of
https://github.com/gin-gonic/gin.git
synced 2026-11-23 11:33:37 +08:00
fix: add DefaultMaxBodySize constant for request body size limits
This commit is contained in:
parent
34dac209ff
commit
6010158337
@ -26,6 +26,11 @@ const (
|
||||
MIMEBSON = "application/bson"
|
||||
)
|
||||
|
||||
// DefaultMaxBodySize is the maximum request body size (in bytes) that the BSON,
|
||||
// Protobuf, and Plain binders will read. Requests with a body larger than this
|
||||
// limit return an error. Set to 0 to disable the limit.
|
||||
const DefaultMaxBodySize = 32 << 20 // 32 MB
|
||||
|
||||
// Binding describes the interface which needs to be implemented for binding the
|
||||
// data present in the request such as JSON request body, query parameters or
|
||||
// the form POST.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user