@@ -26,7 +26,8 @@ package config
|
||||
|
||||
// HTTP describes HTTP server configuration.
|
||||
type HTTP struct {
|
||||
Address string `yaml:"address"`
|
||||
Port string `yaml:"port"`
|
||||
AllowInsecure bool `yaml:"allow_insecure"`
|
||||
Address string `yaml:"address"`
|
||||
Port string `yaml:"port"`
|
||||
AllowInsecure bool `yaml:"allow_insecure"`
|
||||
MaxBodySizeMegabytes string `yaml:"max_body_size_megabytes"`
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user