Add maxrequestbody directive (#1163)

This commit is contained in:
Ngo The Trung
2016-11-04 08:25:49 +08:00
committed by Tw
parent 63f749112b
commit 0cdaaba4b8
9 changed files with 438 additions and 2 deletions
+10
View File
@@ -30,6 +30,16 @@ type SiteConfig struct {
// standardized way of loading files from disk
// for a request.
HiddenFiles []string
// Max amount of bytes a request can send on a given path
MaxRequestBodySizes []PathLimit
}
// PathLimit is a mapping from a site's path to its corresponding
// maximum request body size (in bytes)
type PathLimit struct {
Path string
Limit int64
}
// AddMiddleware adds a middleware to a site's middleware stack.