Browse Source

allow ssl renegotiation for datasources

Brandon Arp 8 năm trước cách đây
mục cha
commit
cffbcb504d
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  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{