driver: Add proxy support

Enable the use of HTTP_PROXY and HTTPS_PROXY variables when downloading
layers
pull/485/head
Grégoire Unbekandt 7 years ago
parent e00e57cc2f
commit 5c5857548d

@ -122,6 +122,7 @@ func Extract(format, path string, headers map[string]string, toExtract []string)
// Send the request and handle the response.
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureTLS},
Proxy: http.ProxyFromEnvironment,
}
client := &http.Client{Transport: tr}
r, err := client.Do(request)

Loading…
Cancel
Save