Skip to content

Commit 98fa493

Browse files
committed
config: allow web-proxy support
Now any of the following env variables may be exported before using cmk with any http/https proxy: export http_proxy='http://user:password@server:3128' export https_proxy='http://user:password@server:3128' export HTTP_PROXY='http://user:password@server:3128' export HTTPS_PROXY='http://user:password@server:3128' Or, run cmk like following: HTTP_PROXY="http://IP:port" cmk Fixes #49 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 43a008c commit 98fa493

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ func newHTTPClient(cfg *Config) *http.Client {
153153
client := &http.Client{
154154
Jar: jar,
155155
Transport: &http.Transport{
156+
Proxy: http.ProxyFromEnvironment,
156157
TLSClientConfig: &tls.Config{InsecureSkipVerify: !cfg.Core.VerifyCert},
157158
},
158159
}

0 commit comments

Comments
 (0)