mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' of github.com:grafana/grafana
This commit is contained in:
commit
b943e41434
@ -96,7 +96,7 @@ Will return the dashboard given the dashboard slug. Slug is the url friendly ver
|
|||||||
"isStarred": false,
|
"isStarred": false,
|
||||||
"slug": "production-overview"
|
"slug": "production-overview"
|
||||||
},
|
},
|
||||||
"model": {
|
"dashboard": {
|
||||||
"id": null,
|
"id": null,
|
||||||
"title": "Production Overview",
|
"title": "Production Overview",
|
||||||
"tags": [ "templated" ],
|
"tags": [ "templated" ],
|
||||||
|
@ -90,6 +90,11 @@ func ProxyDataSourceRequest(c *middleware.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ds.Type == m.DS_CLOUDWATCH {
|
||||||
|
cloudwatch.HandleRequest(c, ds)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
targetUrl, _ := url.Parse(ds.Url)
|
targetUrl, _ := url.Parse(ds.Url)
|
||||||
if len(setting.DataProxyWhiteList) > 0 {
|
if len(setting.DataProxyWhiteList) > 0 {
|
||||||
if _, exists := setting.DataProxyWhiteList[targetUrl.Host]; !exists {
|
if _, exists := setting.DataProxyWhiteList[targetUrl.Host]; !exists {
|
||||||
@ -98,13 +103,9 @@ func ProxyDataSourceRequest(c *middleware.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ds.Type == m.DS_CLOUDWATCH {
|
|
||||||
cloudwatch.HandleRequest(c, ds)
|
|
||||||
} else {
|
|
||||||
proxyPath := c.Params("*")
|
proxyPath := c.Params("*")
|
||||||
proxy := NewReverseProxy(ds, proxyPath, targetUrl)
|
proxy := NewReverseProxy(ds, proxyPath, targetUrl)
|
||||||
proxy.Transport = dataProxyTransport
|
proxy.Transport = dataProxyTransport
|
||||||
proxy.ServeHTTP(c.Resp, c.Req.Request)
|
proxy.ServeHTTP(c.Resp, c.Req.Request)
|
||||||
c.Resp.Header().Del("Set-Cookie")
|
c.Resp.Header().Del("Set-Cookie")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user