Commit 2e9855b9 authored by Christian Köberl's avatar Christian Köberl Committed by Matthew Fisher

Set proxy for all connections, fixes #4326 (#4579)

Signed-off-by: 's avatarChristian Koeberl <christian.koeberl@gmail.com>
parent 7da7047c
......@@ -83,6 +83,7 @@ func NewHTTPGetter(URL, CertFile, KeyFile, CAFile string) (*HttpGetter, error) {
var client HttpGetter
tr := &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
if (CertFile != "" && KeyFile != "") || CAFile != "" {
tlsConf, err := tlsutil.NewTLSConfig(URL, CertFile, KeyFile, CAFile)
......@@ -90,7 +91,6 @@ func NewHTTPGetter(URL, CertFile, KeyFile, CAFile string) (*HttpGetter, error) {
return &client, fmt.Errorf("can't create TLS config: %s", err.Error())
}
tr.TLSClientConfig = tlsConf
tr.Proxy = http.ProxyFromEnvironment
}
client.client = &http.Client{Transport: tr}
return &client, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment