[v9.3.x] SSE: Make sure to forward headers, user and cookies/OAuth token (#59390)

SSE: Make sure to forward headers, user and cookies/OAuth token (#58897)

Fixes #58793 and Fixes https://github.com/grafana/azure-data-explorer-datasource/issues/513

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 5623b5afaf)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-11-28 08:11:52 -05:00
committed by GitHub
co-authored by Kyle Brandt
parent 0e8f0d4b4a
commit 426fab32eb
7 changed files with 426 additions and 122 deletions
+5
View File
@@ -35,14 +35,19 @@ type Request struct {
Debug bool
OrgId int64
Queries []Query
User *backend.User
}
// QueryDataRequestEnricher function definition for enriching a backend.QueryDataRequest request.
type QueryDataRequestEnricher func(ctx context.Context, req *backend.QueryDataRequest) context.Context
// Query is like plugins.DataSubQuery, but with a a time range, and only the UID
// for the data source. Also interval is a time.Duration.
type Query struct {
RefID string
TimeRange TimeRange
DataSource *datasources.DataSource `json:"datasource"`
QueryEnricher QueryDataRequestEnricher
JSON json.RawMessage
Interval time.Duration
QueryType string