1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Honor system http proxies when using non-default transport

This implements the same proxy behavior as per http.DefaultTransport
using HTTP proxies as directed by the $HTTP_PROXY and $NO_PROXY (or
$http_proxy and $no_proxy) environment variables.
This commit is contained in:
skymeyer 2019-01-19 10:46:08 +00:00
parent 1d888118c5
commit 39c3daee23
3 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,7 @@ func (widget *Widget) Refresh() {
TLSClientConfig: &tls.Config{
InsecureSkipVerify: !verifyServerCertificate,
},
Proxy: http.ProxyFromEnvironment,
},
}

View File

@ -34,6 +34,7 @@ func Create(jenkinsURL string, username string, apiKey string) (*View, error) {
TLSClientConfig: &tls.Config{
InsecureSkipVerify: !verifyServerCertificate,
},
Proxy: http.ProxyFromEnvironment,
},
}
resp, err := httpClient.Do(req)

View File

@ -75,6 +75,7 @@ func jiraRequest(path string) (*http.Response, error) {
TLSClientConfig: &tls.Config{
InsecureSkipVerify: !verifyServerCertificate,
},
Proxy: http.ProxyFromEnvironment,
},
}
resp, err := httpClient.Do(req)