瀏覽代碼

Fix bug tls renegociation problem in Notification channel (webhook) #14800

fredbcode 7 年之前
父節點
當前提交
110ffb69de
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pkg/services/notifications/webhook.go

+ 4 - 0
pkg/services/notifications/webhook.go

@@ -3,6 +3,7 @@ package notifications
 import (
 	"bytes"
 	"context"
+	"crypto/tls"
 	"fmt"
 	"io"
 	"io/ioutil"
@@ -26,6 +27,9 @@ type Webhook struct {
 }
 
 var netTransport = &http.Transport{
+	TLSClientConfig: &tls.Config{
+		Renegotiation: tls.RenegotiateFreelyAsClient,
+	},
 	Proxy: http.ProxyFromEnvironment,
 	Dial: (&net.Dialer{
 		Timeout:   30 * time.Second,