mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 20:42:40 +08:00
Backend plugins: Prepare and clean request headers before resource calls (#22321)
Moves common request proxy utilities to proxyutil package with support for removing X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Proto headers, setting X-Forwarded-For header and cleaning Cookie header. Using the proxyutil package to prepare and clean request headers before resource calls. Closes #21512
This commit is contained in:

committed by
GitHub

parent
8b122ee464
commit
e6cec8dbdc
@ -1,10 +1,11 @@
|
||||
package backendplugin
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2"
|
||||
)
|
||||
|
||||
@ -69,7 +70,7 @@ type PluginConfig struct {
|
||||
OrgID int64
|
||||
PluginID string
|
||||
PluginType string
|
||||
JSONData json.RawMessage
|
||||
JSONData *simplejson.Json
|
||||
DecryptedSecureJSONData map[string]string
|
||||
Updated time.Time
|
||||
DataSourceConfig *DataSourceConfig
|
||||
|
Reference in New Issue
Block a user