mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
add the trailing slash
This commit is contained in:
parent
71dfeff782
commit
bc68aa99b2
@ -54,6 +54,15 @@ func (hs *HTTPServer) ProxyDataSourceRequest(c *m.ReqContext) {
|
||||
}
|
||||
|
||||
proxyPath := c.Params("*")
|
||||
|
||||
// Check for a trailing slash
|
||||
if len(proxyPath) > 1 {
|
||||
path := c.Req.URL.Path
|
||||
if path[len(path)-1] == '/' && path[len(path)-2] != '/' {
|
||||
proxyPath += "/"
|
||||
}
|
||||
}
|
||||
|
||||
proxy := pluginproxy.NewDataSourceProxy(ds, plugin, c, proxyPath)
|
||||
proxy.HandleRequest()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user