BodyLimit returns a BodyLimit middleware. BodyLimit middleware sets the maximum allowed size for a request body, if the size exceeds the configured limit, it sends "413 - Request Entity Too Large" response. The BodyLimit is determined based on both `Content-Length` request header and actual content
(limitBytes int64)
| 32 | // sends "413 - Request Entity Too Large" response. The BodyLimit is determined based on both `Content-Length` request |
| 33 | // header and actual content read, which makes it super secure. |
| 34 | func BodyLimit(limitBytes int64) echo.MiddlewareFunc { |
| 35 | return BodyLimitWithConfig(BodyLimitConfig{LimitBytes: limitBytes}) |
| 36 | } |
| 37 | |
| 38 | // BodyLimitWithConfig returns a BodyLimitWithConfig middleware. Middleware sets the maximum allowed size in bytes for |
| 39 | // a request body, if the size exceeds the configured limit, it sends "413 - Request Entity Too Large" response. |
searching dependent graphs…