diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 0e1aa29ae..2db49ea73 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,6 +24,8 @@ The following tip changes can be tested by building VictoriaMetrics components f ## tip + +* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): Adds `enable_http2` on scrape configuration level. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4283). Thanks to @Haleygo for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4295). * FEATURE: [vmctl](https://docs.victoriametrics.com/vmctl.html): add verbose output for docker installations or when TTY isn't available. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4081). * BUGFIX: add the following command-line flags, which can be used for limiting Graphite API calls: `--search.maxGraphiteTagKeys` for limiting the number of tag keys returned from Graphite `/tags`, `/tags/autoComplete/*`, `/tags/findSeries` API. diff --git a/lib/promscrape/client.go b/lib/promscrape/client.go index 7c156ace2..358528510 100644 --- a/lib/promscrape/client.go +++ b/lib/promscrape/client.go @@ -168,12 +168,12 @@ func newClient(ctx context.Context, sw *ScrapeWork) *client { logger.Errorf("failed to configure HTTP/2 transport: %s", err) } } - if sw.DenyRedirects { sc.CheckRedirect = func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse } } + return &client{ hc: hc, ctx: ctx,