mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
server: set maximum allowed request body. (#3324)
This patch sets the value as 5GiB + 64MiB. 5GiB is the maximum allowed object size and 64MiB is for form data fields and headers.
This commit is contained in:
parent
825000bc34
commit
baf1c1638d
@ -42,9 +42,13 @@ func registerHandlers(mux *router.Router, handlerFns ...HandlerFunc) http.Handle
|
||||
|
||||
// Adds limiting body size middleware
|
||||
|
||||
// Set the body size limit to 6 Gb = Maximum object size + other possible data
|
||||
// in the same request
|
||||
const requestMaxBodySize = (5 + 1) * humanize.GiByte
|
||||
// Maximum allowed form data field values. 64MiB is a guessed practical value
|
||||
// which is more than enough to accommodate any form data fields and headers.
|
||||
const requestFormDataSize = 64 * humanize.MiByte
|
||||
|
||||
// For any HTTP request, request body should be not more than 5GiB + requestFormDataSize
|
||||
// where, 5GiB is the maximum allowed object size for object upload.
|
||||
const requestMaxBodySize = 5*humanize.GiByte + requestFormDataSize
|
||||
|
||||
type requestSizeLimitHandler struct {
|
||||
handler http.Handler
|
||||
|
Loading…
Reference in New Issue
Block a user