Documentation
¶
Index ¶
Constants ¶
View Source
const (
PostSizeKey contextKey = "post-size"
)
Variables ¶
View Source
var ( DefaultMaxPostSize int64 = 1024 * 1024 * 10 // 10Mb DefaultPostLimitFailedHandler = PostLimitFailedHandler(func(w http.ResponseWriter, r *http.Request) { http.Error(w, "max post size exceeded", http.StatusBadRequest) }) )
Functions ¶
func MaxPostSizeOf ¶
Types ¶
type FormParser ¶
type Middleware ¶
func (*Middleware) ServeHttp ¶
func (m *Middleware) ServeHttp(w http.ResponseWriter, r *http.Request)
type Opts ¶
type Opts struct {
MaxPostSize int64
ErrorHandler http.HandlerFunc
}
type PostLimitFailedHandler ¶
type PostLimitFailedHandler = http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.