{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/4815","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/4815/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/4815/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/4815/events","html_url":"https://github.com/grafana/grafana/issues/4815","id":151072057,"number":4815,"title":"[feat req]: Pass Authorization header to proxied data source API","user":{"login":"jazdw","id":3579645,"avatar_url":"https://avatars.githubusercontent.com/u/3579645?v=3","gravatar_id":"","url":"https://api.github.com/users/jazdw","html_url":"https://github.com/jazdw","followers_url":"https://api.github.com/users/jazdw/followers","following_url":"https://api.github.com/users/jazdw/following{/other_user}","gists_url":"https://api.github.com/users/jazdw/gists{/gist_id}","starred_url":"https://api.github.com/users/jazdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazdw/subscriptions","organizations_url":"https://api.github.com/users/jazdw/orgs","repos_url":"https://api.github.com/users/jazdw/repos","events_url":"https://api.github.com/users/jazdw/events{/privacy}","received_events_url":"https://api.github.com/users/jazdw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grafana/grafana/labels/comp:%20backend/auth","name":"comp: backend/auth","color":"c7def8"},{"url":"https://api.github.com/repos/grafana/grafana/labels/comp:%20datasource/proxy","name":"comp: datasource/proxy","color":"c5def5"},{"url":"https://api.github.com/repos/grafana/grafana/labels/state:%20help%20wanted%20(PR)","name":"state: help wanted (PR)","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-26T08:19:49Z","updated_at":"2016-04-26T12:30:48Z","closed_at":null,"body":"I'm writing a data source plugin and there is no way to pass an Authorization header to the data source's REST api call when you use the Proxy access mode.\r\n\r\nIf you set a header like this, then it works for direct access but with proxy access Grafana tries to use the token itself instead of passing it through to the data sources REST endpoint.\r\n\r\n````\r\nthis.backendSrv.datasourceRequest({\r\n      headers: {\r\n        'Authorization': 'Bearer ' + this.authToken\r\n      },\r\n      ...\r\n````"},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/214723698","html_url":"https://github.com/grafana/grafana/issues/4815#issuecomment-214723698","issue_url":"https://api.github.com/repos/grafana/grafana/issues/4815","id":214723698,"user":{"login":"torkelo","id":10999,"avatar_url":"https://avatars.githubusercontent.com/u/10999?v=3","gravatar_id":"","url":"https://api.github.com/users/torkelo","html_url":"https://github.com/torkelo","followers_url":"https://api.github.com/users/torkelo/followers","following_url":"https://api.github.com/users/torkelo/following{/other_user}","gists_url":"https://api.github.com/users/torkelo/gists{/gist_id}","starred_url":"https://api.github.com/users/torkelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torkelo/subscriptions","organizations_url":"https://api.github.com/users/torkelo/orgs","repos_url":"https://api.github.com/users/torkelo/repos","events_url":"https://api.github.com/users/torkelo/events{/privacy}","received_events_url":"https://api.github.com/users/torkelo/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T12:30:48Z","updated_at":"2016-04-26T12:30:48Z","body":"well it should not be needed for other things, all other headers are proxied, just Authorization that conflicts with Grafana Auth "}}