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

only configure plugin proxy transport once
pull/71658/head
Will Browne 3 years ago committed by GitHub
parent 7738a9846c
commit b59ca7fb22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      pkg/api/plugin_proxy.go

@ -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{

Loading…
Cancel
Save