Loki: Allow alert headers to be forwarded (#90890)

* Loki: Allow alert headers to be forwarded

* Loki: fix tests

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
Sven Grossmann
2024-07-25 07:39:34 +02:00
committed by GitHub
co-authored by Yuri Tseretyan
parent dc355331a6
commit 94dd4105e2
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -334,7 +334,7 @@ func buildDatasourceHeaders(ctx context.Context, metadata map[string]string) map
headers := make(map[string]string, len(metadata)+3)
for key, value := range metadata {
headers[fmt.Sprintf("X-Rule-%s", key)] = url.QueryEscape(value)
headers[fmt.Sprintf("http_X-Rule-%s", key)] = url.QueryEscape(value)
}
// Many data sources check this in query method as sometimes alerting needs special considerations.