From 48586eb0aa2c153540c818fae5470a9aac4eae54 Mon Sep 17 00:00:00 2001 From: Yi Tao Jiang Date: Wed, 27 Jul 2016 23:24:54 +0800 Subject: [PATCH] Support making request with proxy --- .gitignore | 3 ++- http.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2ec9320..43801e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ gin-bin -example.config.local.json \ No newline at end of file +example.config.local.json +.idea diff --git a/http.go b/http.go index 3391174..6729625 100644 --- a/http.go +++ b/http.go @@ -21,6 +21,7 @@ func (monitor *CachetMonitor) makeRequest(requestType string, url string, reqBod if monitor.InsecureAPI == true { client.Transport = &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + Proxy: http.ProxyFromEnvironment, } }