diff options
author | JoramWilander <jwawilander@gmail.com> | 2016-02-05 08:21:15 -0500 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2016-02-05 08:21:15 -0500 |
commit | 8c505e7b5cb8138e53b71ed7e0465665654a596b (patch) | |
tree | 4c89f98fc16cb9b91dd02d8244c0e0076e5a9e60 /api/post.go | |
parent | 8e79f12f3c6c0f8858addaf6f66ea6e88a965b65 (diff) | |
download | chat-8c505e7b5cb8138e53b71ed7e0465665654a596b.tar.gz chat-8c505e7b5cb8138e53b71ed7e0465665654a596b.tar.bz2 chat-8c505e7b5cb8138e53b71ed7e0465665654a596b.zip |
Accept unsigned TLS certs for SSO and outgoing hooks, also fix delete hooks bug
Diffstat (limited to 'api/post.go')
-rw-r--r-- | api/post.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/api/post.go b/api/post.go index c17da262f..58f490558 100644 --- a/api/post.go +++ b/api/post.go @@ -4,6 +4,7 @@ package api import ( + "crypto/tls" "fmt" l4g "github.com/alecthomas/log4go" "github.com/gorilla/mux" @@ -401,7 +402,11 @@ func handleWebhookEventsAndForget(c *Context, post *model.Post, team *model.Team p.Set("text", post.Message) p.Set("trigger_word", firstWord) - client := &http.Client{} + // accept any TLS certs + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + client := &http.Client{Transport: tr} for _, url := range hook.CallbackURLs { go func(url string) { |