mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
c35c689a96
Automatically forward core plugin request HTTP headers in outgoing HTTP requests. Core datasource plugin authors don't have to specifically handle forwarding of HTTP headers, e.g. do not have to "hardcode" the header-names in the datasource plugin, if not having custom needs. Fixes #57065
22 lines
867 B
Go
22 lines
867 B
Go
package models
|
|
|
|
const (
|
|
// FromAlertHeaderName name of header added to datasource query requests
|
|
// to denote request is originating from Grafana Alerting.
|
|
//
|
|
// Data sources might check this in query method as sometimes alerting
|
|
// needs special considerations.
|
|
// Several existing systems also compare against the value of this header.
|
|
// Altering this constitutes a breaking change.
|
|
//
|
|
// Note: The spelling of this headers is intentionally degenerate from the
|
|
// others for compatibility reasons. When sent over a network, the key of
|
|
// this header is canonicalized to "Fromalert".
|
|
// However, some datasources still compare against the string "FromAlert".
|
|
FromAlertHeaderName = "FromAlert"
|
|
|
|
// CacheSkipHeaderName name of header added to datasource query requests
|
|
// to denote request should not be cached.
|
|
CacheSkipHeaderName = "X-Cache-Skip"
|
|
)
|