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:
parent
1d888118c5
commit
39c3daee23
@ -79,6 +79,7 @@ func (widget *Widget) Refresh() {
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: !verifyServerCertificate,
|
||||
},
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -75,6 +75,7 @@ func jiraRequest(path string) (*http.Response, error) {
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: !verifyServerCertificate,
|
||||
},
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
},
|
||||
}
|
||||
resp, err := httpClient.Do(req)
|
||||
|
Loading…
x
Reference in New Issue
Block a user