|
|
@@ -6,6 +6,7 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"io/ioutil"
|
|
|
+ "net"
|
|
|
"net/http"
|
|
|
"net/url"
|
|
|
"path"
|
|
|
@@ -25,7 +26,16 @@ func Init(version string) {
|
|
|
grafanaVersion = version
|
|
|
|
|
|
tr := &http.Transport{
|
|
|
- Proxy: http.ProxyFromEnvironment,
|
|
|
+ Proxy: http.ProxyFromEnvironment,
|
|
|
+ DialContext: (&net.Dialer{
|
|
|
+ Timeout: 30 * time.Second,
|
|
|
+ KeepAlive: 30 * time.Second,
|
|
|
+ }).DialContext,
|
|
|
+ MaxIdleConns: 100,
|
|
|
+ IdleConnTimeout: 90 * time.Second,
|
|
|
+ TLSHandshakeTimeout: 10 * time.Second,
|
|
|
+ ExpectContinueTimeout: 1 * time.Second,
|
|
|
+
|
|
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: false},
|
|
|
}
|
|
|
|