mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 05:43:00 +08:00
Datasources: Introduce response_limit
for datasource responses (#38962)
* Introduce response_limit for datasource responses * Fix lint * Fix tests * Add case where limit <= 0 - added parametrized tests * Add max_bytes_reader.go * Use new httpclient.MaxBytesReader instead of net/http one * Fixes according to reviewer's comments * Add tests for max_bytes_reader * Add small piece in configuration.md * Further fixes according to reviewer's comments * Fix linting - fix test
This commit is contained in:

committed by
GitHub

parent
5fcc9fe193
commit
ba9d5540b8
@ -14,6 +14,7 @@ func readDataProxySettings(iniFile *ini.File, cfg *Cfg) error {
|
||||
cfg.DataProxyMaxConnsPerHost = dataproxy.Key("max_conns_per_host").MustInt(0)
|
||||
cfg.DataProxyMaxIdleConns = dataproxy.Key("max_idle_connections").MustInt()
|
||||
cfg.DataProxyIdleConnTimeout = dataproxy.Key("idle_conn_timeout_seconds").MustInt(90)
|
||||
cfg.ResponseLimit = dataproxy.Key("response_limit").MustInt64(0)
|
||||
|
||||
if val, err := dataproxy.Key("max_idle_connections_per_host").Int(); err == nil {
|
||||
cfg.Logger.Warn("[Deprecated] the configuration setting 'max_idle_connections_per_host' is deprecated, please use 'max_idle_connections' instead")
|
||||
|
Reference in New Issue
Block a user