Add body_size_limit option to http module (#836)
authorMarcelo Magallon <marcelo.magallon@grafana.com>
Tue, 19 Oct 2021 16:50:47 +0000 (10:50 -0600)
committerGitHub <noreply@github.com>
Tue, 19 Oct 2021 16:50:47 +0000 (10:50 -0600)
commite86980961f8e463288e31cac03255701cb1a11d1
tree10f07ea93538d0bee2ef06b4558d9e2e3a4b3c77
parent72910e550ec710e4ea408edeec8aac4258394cbf
Add body_size_limit option to http module (#836)

This option limits the maximum body length that will be read from the
HTTP server. It's meant to prevent misconfigured servers from causing
the probe to use too many resources, even if temporarily. It's not an
additional check on the response, for that, use the resulting metrics
(probe_http_content_length, probe_http_uncompressed_body_length, etc).

Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
CONFIGURATION.md
config/config.go
config/testdata/blackbox-good.yml
go.mod
go.sum
prober/http.go
prober/http_test.go