diff options
author | JoramWilander <jwawilander@gmail.com> | 2016-02-05 12:40:32 -0500 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2016-02-05 12:40:32 -0500 |
commit | 9f5f18a93a6db2b9c1089862fb68c2ee33e634ca (patch) | |
tree | 67f66a9bcfda2ad1d87ae238b47f8be6531522b2 /api/user.go | |
parent | 8c505e7b5cb8138e53b71ed7e0465665654a596b (diff) | |
download | chat-9f5f18a93a6db2b9c1089862fb68c2ee33e634ca.tar.gz chat-9f5f18a93a6db2b9c1089862fb68c2ee33e634ca.tar.bz2 chat-9f5f18a93a6db2b9c1089862fb68c2ee33e634ca.zip |
Make insecure TLS connections configurable
Diffstat (limited to 'api/user.go')
-rw-r--r-- | api/user.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go index aa06fa910..507c83d28 100644 --- a/api/user.go +++ b/api/user.go @@ -1961,9 +1961,8 @@ func AuthorizeOAuthUser(service, code, state, redirectUri string) (io.ReadCloser p.Set("grant_type", model.ACCESS_TOKEN_GRANT_TYPE) p.Set("redirect_uri", redirectUri) - // accept any TLS certs tr := &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + TLSClientConfig: &tls.Config{InsecureSkipVerify: *utils.Cfg.ServiceSettings.EnableInsecureOutgoingConnections}, } client := &http.Client{Transport: tr} req, _ := http.NewRequest("POST", sso.TokenEndpoint, strings.NewReader(p.Encode())) |