Support making request with proxy

This commit is contained in:
Yi Tao Jiang
2016-07-27 23:24:54 +08:00
parent 0de0baf5f9
commit 48586eb0aa
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
gin-bin gin-bin
example.config.local.json example.config.local.json
.idea

View File

@@ -21,6 +21,7 @@ func (monitor *CachetMonitor) makeRequest(requestType string, url string, reqBod
if monitor.InsecureAPI == true { if monitor.InsecureAPI == true {
client.Transport = &http.Transport{ client.Transport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyFromEnvironment,
} }
} }