mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add check so that header is not sent for anonymous users
This commit is contained in:
@@ -80,7 +80,7 @@ func NewApiPluginProxy(ctx *m.ReqContext, proxyPath string, route *plugins.AppPl
|
||||
|
||||
req.Header.Add("X-Grafana-Context", string(ctxJson))
|
||||
|
||||
if cfg.SendUserHeader {
|
||||
if cfg.SendUserHeader && !ctx.SignedInUser.IsAnonymous {
|
||||
req.Header.Add("X-Grafana-User", ctx.SignedInUser.Login)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user