Add support for HTTP{S}_PROXY env variables (#162)
This commit is contained in:
parent
d300bb1735
commit
29465397dd
|
@ -106,7 +106,7 @@ func (m *MMClient) Login() error {
|
||||||
}
|
}
|
||||||
// login to mattermost
|
// login to mattermost
|
||||||
m.Client = model.NewClient(uriScheme + m.Credentials.Server)
|
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
|
m.Client.HttpClient.Timeout = time.Second * 10
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|
Loading…
Reference in New Issue