Make insecure TLS connections configurable

Этот коммит содержится в:
JoramWilander
2016-02-05 12:40:32 -05:00
родитель 8c505e7b5c
Коммит 9f5f18a93a
9 изменённых файлов: 95 добавлений и 30 удалений

Просмотреть файл

@@ -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()))