[v10.0.x] Plugins: Only configure plugin proxy transport once (#71742)

Plugins: Only configure plugin proxy transport once (#71735)

only configure plugin proxy transport once

(cherry picked from commit b59ca7fb22)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2023-07-17 14:52:48 +03:00
committed by GitHub
co-authored by Will Browne
parent 62eccdd789
commit 6a083469f9
+5 -2
View File
@@ -14,9 +14,12 @@ import (
"github.com/grafana/grafana/pkg/web"
)
var (
once sync.Once
pluginProxyTransport *http.Transport
)
func (hs *HTTPServer) ProxyPluginRequest(c *contextmodel.ReqContext) {
var once sync.Once
var pluginProxyTransport *http.Transport
once.Do(func() {
pluginProxyTransport = &http.Transport{
TLSClientConfig: &tls.Config{