mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:53:10 +08:00
DataProxy: Populate X-Grafana-Referer header (#60040)
* ProxyUtil: Populate X-Grafana-Referer header * ProxyUtil: Move Referer/Origin header removal So that the removal and setting X-Grafana-Referer logic applies to all proxied requests and not just datasource proxy. * ProxyUtil: Test to guard against multiline headers * ProxyUtil: Explicitly check injected header isn't parsed
This commit is contained in:
@ -76,10 +76,6 @@ func wrapDirector(d func(*http.Request)) func(req *http.Request) {
|
||||
|
||||
d(req)
|
||||
PrepareProxyRequest(req)
|
||||
|
||||
// Clear Origin and Referer to avoid CORS issues
|
||||
req.Header.Del("Origin")
|
||||
req.Header.Del("Referer")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user