File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11package config
22
33import (
4+ "crypto/tls"
45 "fmt"
56 "net/http"
67
@@ -20,6 +21,7 @@ type CloudCredentials struct {
2021 Cloud string `gcfg:"cloud"`
2122 AuthURL string `gcfg:"auth-url"`
2223 Region string `gcfg:"region"`
24+ Insecure bool `gcfg:"insecure"`
2325 AccessKey string `gcfg:"access-key"`
2426 SecretKey string `gcfg:"secret-key"`
2527 ProjectID string `gcfg:"project-id"`
@@ -135,7 +137,14 @@ func (c *CloudCredentials) newCloudClient() error {
135137 return err
136138 }
137139
138- transport := & http.Transport {Proxy : http .ProxyFromEnvironment }
140+ transport := & http.Transport {
141+ Proxy : http .ProxyFromEnvironment ,
142+ TLSClientConfig : & tls.Config {
143+ MinVersion : tls .VersionTLS12 ,
144+ InsecureSkipVerify : c .Global .Insecure ,
145+ },
146+ }
147+
139148 client .HTTPClient = http.Client {
140149 Transport : & utils.LogRoundTripper {
141150 Rt : transport ,
You can’t perform that action at this time.
0 commit comments