Plugins: Only configure plugin proxy transport once (#71735)
only configure plugin proxy transport once
This commit is contained in:
@@ -14,9 +14,12 @@ import (
|
|||||||
"github.com/grafana/grafana/pkg/web"
|
"github.com/grafana/grafana/pkg/web"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
once sync.Once
|
||||||
|
pluginProxyTransport *http.Transport
|
||||||
|
)
|
||||||
|
|
||||||
func (hs *HTTPServer) ProxyPluginRequest(c *contextmodel.ReqContext) {
|
func (hs *HTTPServer) ProxyPluginRequest(c *contextmodel.ReqContext) {
|
||||||
var once sync.Once
|
|
||||||
var pluginProxyTransport *http.Transport
|
|
||||||
once.Do(func() {
|
once.Do(func() {
|
||||||
pluginProxyTransport = &http.Transport{
|
pluginProxyTransport = &http.Transport{
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
|
|||||||
Reference in New Issue
Block a user