HttpServer: Make read timeout configurable but disabled by default (#31575)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This commit is contained in:
Carl Bergquist
2021-03-19 11:21:52 +01:00
committed by GitHub
co-authored by achatterjee-grafana
parent fb337e5c1d
commit 862cd473eb
6 changed files with 29 additions and 2 deletions
+3
View File
@@ -202,6 +202,7 @@ type Cfg struct {
RouterLogging bool
Domain string
CDNRootURL *url.URL
ReadTimeout time.Duration
EnableGzip bool
EnforceDomain bool
@@ -1368,6 +1369,8 @@ func (cfg *Cfg) readServerSettings(iniFile *ini.File) error {
}
}
cfg.ReadTimeout = server.Key("read_timeout").MustDuration(0)
return nil
}