Support making request with proxy
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
gin-bin
|
gin-bin
|
||||||
example.config.local.json
|
example.config.local.json
|
||||||
|
.idea
|
||||||
|
|||||||
1
http.go
1
http.go
@@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user