webhook: Add support of custom CAs (#4000)

This commit is contained in:
Anis Elleuch 2017-03-29 21:42:55 +01:00 committed by Harshavardhana
parent e2aba9196f
commit fbe8b3259d

View File

@ -17,6 +17,7 @@
package cmd
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net"
@ -81,6 +82,7 @@ func newWebhookNotify(accountID string) (*logrus.Logger, error) {
// Configure aggressive timeouts for client posts.
Client: &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{RootCAs: globalRootCAs},
DialContext: (&net.Dialer{
Timeout: 5 * time.Second,
KeepAlive: 5 * time.Second,