Add custom header with grafana user and a config switch for it

This commit is contained in:
Andrej Ocenas
2019-03-14 16:33:19 +01:00
parent 191a7e4b8d
commit bbdc1c0e64
9 changed files with 129 additions and 20 deletions
+4
View File
@@ -242,6 +242,9 @@ type Cfg struct {
// User
EditorsCanOwn bool
// Dataproxy
SendUserHeader bool
// DistributedCache
RemoteCacheOptions *RemoteCacheOptions
}
@@ -604,6 +607,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
dataproxy := iniFile.Section("dataproxy")
DataProxyLogging = dataproxy.Key("logging").MustBool(false)
DataProxyTimeout = dataproxy.Key("timeout").MustInt(30)
cfg.SendUserHeader = dataproxy.Key("send_user_header").MustBool(false)
// read security settings
security := iniFile.Section("security")