|
|
@ -78,9 +78,9 @@ func NewHTTPClient(cfg config.HTTPClientConfig) (*http.Client, error) {
|
|
|
|
// The only timeout we care about is the configured scrape timeout.
|
|
|
|
// The only timeout we care about is the configured scrape timeout.
|
|
|
|
// It is applied on request. So we leave out any timings here.
|
|
|
|
// It is applied on request. So we leave out any timings here.
|
|
|
|
var rt http.RoundTripper = &http.Transport{
|
|
|
|
var rt http.RoundTripper = &http.Transport{
|
|
|
|
Proxy: http.ProxyURL(cfg.ProxyURL.URL),
|
|
|
|
Proxy: http.ProxyURL(cfg.ProxyURL.URL),
|
|
|
|
DisableKeepAlives: true,
|
|
|
|
MaxIdleConns: 10000,
|
|
|
|
TLSClientConfig: tlsConfig,
|
|
|
|
TLSClientConfig: tlsConfig,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// If a bearer token is provided, create a round tripper that will set the
|
|
|
|
// If a bearer token is provided, create a round tripper that will set the
|
|
|
|