BodyLimitWithConfig returns a BodyLimitWithConfig middleware. Middleware sets the maximum allowed size in bytes for a request body, if the size exceeds the configured limit, it sends "413 - Request Entity Too Large" response. The BodyLimitWithConfig is determined based on both `Content-Length` requ
(config BodyLimitConfig)
| 40 | // The BodyLimitWithConfig is determined based on both `Content-Length` request header and actual content read, which |
| 41 | // makes it super secure. |
| 42 | func BodyLimitWithConfig(config BodyLimitConfig) echo.MiddlewareFunc { |
| 43 | return toMiddlewareOrPanic(config) |
| 44 | } |
| 45 | |
| 46 | // ToMiddleware converts BodyLimitConfig to middleware or returns an error for invalid configuration |
| 47 | func (config BodyLimitConfig) ToMiddleware() (echo.MiddlewareFunc, error) { |
searching dependent graphs…