diff --git a/app/echoSettings.go b/app/echoSettings.go index 9f7ab40..e9f32b9 100644 --- a/app/echoSettings.go +++ b/app/echoSettings.go @@ -6,6 +6,7 @@ package app import ( "encoding/hex" "net/http" + "time" "github.com/gorilla/sessions" "github.com/labstack/echo-contrib/session" @@ -43,6 +44,10 @@ func (a *App) SetEchoSettings() { // }, // })) + // TODO: make this configurable. + e.Server.WriteTimeout = 30 * time.Second + e.Server.ReadHeaderTimeout = 30 * time.Second + if a.setting.HTTPRateLimitEnabled() { limit := rate.Limit(a.setting.HTTPRateLimit())