go: set global default {read,write} timeouts
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
258c6accf0
commit
044ed583b9
@ -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())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user