mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 19:02:36 +08:00
Plugins: Forward user header (X-Grafana-User) in backend plugin requests (#58646)
Grafana would forward the X-Grafana-User header to backend plugin request when dataproxy.send_user_header is enabled. In addition, X-Grafana-User will be automatically forwarded in outgoing HTTP requests for core/builtin HTTP datasources. Use grafana-plugin-sdk-go v0.147.0. Fixes #47734 Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
ecf83a6df9
commit
6478d0a5ef
@ -77,5 +77,9 @@ func CreateMiddlewares(cfg *setting.Cfg, oAuthTokenService oauthtoken.OAuthToken
|
||||
clientmiddleware.NewCookiesMiddleware(skipCookiesNames),
|
||||
}
|
||||
|
||||
if cfg.SendUserHeader {
|
||||
middlewares = append(middlewares, clientmiddleware.NewUserHeaderMiddleware())
|
||||
}
|
||||
|
||||
return middlewares
|
||||
}
|
||||
|
Reference in New Issue
Block a user