mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
make sure we don't add the slash twice
This commit is contained in:
parent
7c6227c061
commit
7168190f7a
@ -55,10 +55,11 @@ func (hs *HTTPServer) ProxyDataSourceRequest(c *m.ReqContext) {
|
|||||||
|
|
||||||
proxyPath := c.Params("*")
|
proxyPath := c.Params("*")
|
||||||
|
|
||||||
// Check for a trailing slash
|
// Check for a trailing slash, and pass it to the proxy
|
||||||
|
// macaron does not include trailing slashes when resolving a wildcard path
|
||||||
if len(proxyPath) > 1 {
|
if len(proxyPath) > 1 {
|
||||||
path := c.Req.URL.Path
|
path := c.Req.URL.Path
|
||||||
if path[len(path)-1] == '/' && path[len(path)-2] != '/' {
|
if path[len(path)-1] == '/' && proxyPath[len(proxyPath)-1] != '/' {
|
||||||
proxyPath += "/"
|
proxyPath += "/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user