diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-02-08 07:34:39 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-02-08 07:34:39 -0500 |
commit | be70bbc2f027bcc32d54e03c6b66f7e3aadec425 (patch) | |
tree | 02cbf3694b44045422b46fdb90a4b272c1fad976 /api/command.go | |
parent | 9b35fb5fa59099fe644a1b1ef3734b09b50f98bf (diff) | |
parent | 9f5f18a93a6db2b9c1089862fb68c2ee33e634ca (diff) | |
download | chat-be70bbc2f027bcc32d54e03c6b66f7e3aadec425.tar.gz chat-be70bbc2f027bcc32d54e03c6b66f7e3aadec425.tar.bz2 chat-be70bbc2f027bcc32d54e03c6b66f7e3aadec425.zip |
Merge pull request #2083 from mattermost/plt-1879
PLT-1879 Add config setting to accept unsigned TLS certs for SSO and outgoing hooks, also fix deleteā¦
Diffstat (limited to 'api/command.go')
-rw-r--r-- | api/command.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/api/command.go b/api/command.go index 49d9e84f1..bebe6629c 100644 --- a/api/command.go +++ b/api/command.go @@ -4,6 +4,7 @@ package api import ( + "crypto/tls" "fmt" "io/ioutil" "net/http" @@ -173,7 +174,11 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) { method = "GET" } - client := &http.Client{} + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: *utils.Cfg.ServiceSettings.EnableInsecureOutgoingConnections}, + } + client := &http.Client{Transport: tr} + req, _ := http.NewRequest(method, cmd.URL, strings.NewReader(p.Encode())) req.Header.Set("Accept", "application/json") if cmd.Method == model.COMMAND_METHOD_POST { |