File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -100,15 +100,19 @@ func buildTransport(opts ClientOpts, flags *Flags) http.RoundTripper {
100100 {
101101 tp := http .DefaultTransport .(* http.Transport ).Clone ()
102102
103- if flags .insecureSkipVerify != nil && * flags .insecureSkipVerify {
104- transport .TLSClientConfig = & tls.Config {InsecureSkipVerify : true }
105- }
103+ if flags .insecureSkipVerify != nil && * flags .insecureSkipVerify {
104+ tp .TLSClientConfig = & tls.Config {InsecureSkipVerify : true }
105+ }
106106
107- // not we do not fail here if requireAccessToken is true, because that would
108- // mean returning an error on construction which we want to avoid for now
109- // TODO(burmudar): allow returning of an error upon client construction
110- if opts .AccessToken == "" && opts .OAuthToken != nil {
111- transport = oauth .NewTransport (transport , opts .OAuthToken )
107+ if tp .TLSClientConfig == nil {
108+ tp .TLSClientConfig = & tls.Config {}
109+ }
110+
111+ if opts .ProxyURL != nil || opts .ProxyPath != "" {
112+ tp = withProxyTransport (tp , opts .ProxyURL , opts .ProxyPath )
113+ }
114+
115+ transport = tp
112116 }
113117
114118 // not we do not fail here if requireAccessToken is true, because that would
You can’t perform that action at this time.
0 commit comments