Skip to content

Commit

Permalink
Merge pull request harness#1724 from bradrydzewski/master
Browse files Browse the repository at this point in the history
ensure client uses ProxyFromEnvironment
  • Loading branch information
bradrydzewski authored Jul 21, 2016
2 parents 90a15fb + d05aad8 commit b675867
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/client_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ func NewClientTokenTLS(uri, token string, c *tls.Config) Client {
auther := config.Client(oauth2.NoContext, &oauth2.Token{AccessToken: token})
if c != nil {
if trans, ok := auther.Transport.(*oauth2.Transport); ok {
trans.Base = &http.Transport{TLSClientConfig: c}
trans.Base = &http.Transport{
TLSClientConfig: c,
Proxy: http.ProxyFromEnvironment,
}
}
}
return &client{client: auther, base: uri, token: token}
Expand Down

0 comments on commit b675867

Please sign in to comment.