瀏覽代碼

allow ssl renegotiation for datasources

Brandon Arp 8 年之前
父節點
當前提交
cffbcb504d
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 4 1
      pkg/api/app_routes.go
  2. 1 0
      pkg/models/datasource_cache.go

+ 4 - 1
pkg/api/app_routes.go

@@ -17,7 +17,10 @@ import (
 )
 
 var pluginProxyTransport = &http.Transport{
-	TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
+	TLSClientConfig: &tls.Config{
+		InsecureSkipVerify: true,
+		Renegotiation: tls.RenegotiateFreelyAsClient,
+	},
 	Proxy:           http.ProxyFromEnvironment,
 	Dial: (&net.Dialer{
 		Timeout:   30 * time.Second,

+ 1 - 0
pkg/models/datasource_cache.go

@@ -48,6 +48,7 @@ func (ds *DataSource) GetHttpTransport() (*http.Transport, error) {
 	transport := &http.Transport{
 		TLSClientConfig: &tls.Config{
 			InsecureSkipVerify: true,
+			Renegotiation: tls.RenegotiateFreelyAsClient,
 		},
 		Proxy: http.ProxyFromEnvironment,
 		Dial: (&net.Dialer{