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:
Dimitris Sotirakis
2021-09-10 16:51:06 +03:00
committed by GitHub
parent 5fcc9fe193
commit ba9d5540b8
11 changed files with 214 additions and 5 deletions
@@ -435,6 +435,10 @@ The length of time that Grafana maintains idle connections before closing them.
If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request. Default is `false`.
### response_limit
Limits the amount of bytes that will be read/accepted from responses of outgoing HTTP requests. Default is `0` which means disabled.
<hr />
## [analytics]