Added maximum request body size limiting.

Fixes #19.
This commit is contained in:
2020-02-29 22:49:44 +05:00
parent 47672c586d
commit 5f58741159
3 changed files with 8 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ func (c *Context) initializeHTTPServer() {
c.Echo = echo.New()
c.Echo.Use(c.echoReqLogger())
c.Echo.Use(middleware.Recover())
c.Echo.Use(middleware.BodyLimit(c.Config.HTTP.MaxBodySizeMegabytes + "M"))
c.Echo.DisableHTTP2 = true
c.Echo.HideBanner = true
c.Echo.HidePort = true