the json below is a part of my plugin.json, I created a route and would like to pass through the header the user who is logged in. I tried to pass a global variable but the grafana can not parse the template. is there a way to do this?
{
"routes": [
{
"path": "myapi",
"url": "{{ .JsonData.apiUrl }}",
"headers": [
{
"name": "x-grafana-user",
"content": "{{${__user.login}}}" // <--- it doesn't work
}
],
"tokenAuth": {
"url": "{{ .JsonData.cognitoUrl }}",
"params": {
"grant_type": "client_credentials",
"client_id": "{{ .JsonData.clientId }}",
"client_secret": "{{ .SecureJsonData.clientSecret }}",
"scope": "grafana_api/users"
}
}
}
}