Add support for HTTP{S}_PROXY env variables (#162)

This commit is contained in:
ryarnyah 2017-05-08 21:20:52 +02:00 committed by Wim
parent d300bb1735
commit 29465397dd
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ func (m *MMClient) Login() error {
}
// login to mattermost
m.Client = model.NewClient(uriScheme + m.Credentials.Server)
m.Client.HttpClient.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: m.SkipTLSVerify}}
m.Client.HttpClient.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: m.SkipTLSVerify}, Proxy: http.ProxyFromEnvironment}
m.Client.HttpClient.Timeout = time.Second * 10
for {