Explorar o código

fixing #2021

This tiny commit fixes a routing problem for proxy requests. The
router was expecting a url path behind the proxy id, if none was
given (read: the service proxied was at the root of a host) then
the router would return a 404. With this patch it now propperly
uses ProxyDataSourceRequest.
Heinz N. Gies %!s(int64=10) %!d(string=hai) anos
pai
achega
7cf9046dc5
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      pkg/api/api.go

+ 1 - 0
pkg/api/api.go

@@ -94,6 +94,7 @@ func Register(r *macaron.Macaron) {
 
 		r.Get("/frontend/settings/", GetFrontendSettings)
 		r.Any("/datasources/proxy/:id/*", reqSignedIn, ProxyDataSourceRequest)
+		r.Any("/datasources/proxy/:id", reqSignedIn, ProxyDataSourceRequest)
 
 		// Dashboard
 		r.Group("/dashboards", func() {