From d05aad8b48bd8e0b5d9bf3539cf0b7fee1bcd119 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 20 Jul 2016 22:35:51 -0700 Subject: [PATCH] ensure client uses ProxyFromEnvironment --- client/client_impl.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/client_impl.go b/client/client_impl.go index ac6b42513..b421b2a44 100644 --- a/client/client_impl.go +++ b/client/client_impl.go @@ -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}