fix: #12461 introduced issues with route registration ordering, adding plugin static routes before plugins package had been initiated (#12474)
This commit is contained in:
@@ -9,16 +9,7 @@ import (
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
func (hs *HTTPServer) applyRoutes() {
|
||||
hs.RouteRegister.Register(hs.macaron)
|
||||
|
||||
InitAppPluginRoutes(hs.macaron)
|
||||
|
||||
hs.macaron.NotFound(NotFoundHandler)
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) registerRoutes() {
|
||||
macaronR := hs.macaron
|
||||
reqSignedIn := middleware.Auth(&middleware.AuthOptions{ReqSignedIn: true})
|
||||
reqGrafanaAdmin := middleware.Auth(&middleware.AuthOptions{ReqSignedIn: true, ReqGrafanaAdmin: true})
|
||||
reqEditorRole := middleware.RoleAuth(m.ROLE_EDITOR, m.ROLE_ADMIN)
|
||||
@@ -28,9 +19,6 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
quota := middleware.Quota
|
||||
bind := binding.Bind
|
||||
|
||||
// automatically set HEAD for every GET
|
||||
macaronR.SetAutoHead(true)
|
||||
|
||||
r := hs.RouteRegister
|
||||
|
||||
// not logged in views
|
||||
|
||||
Reference in New Issue
Block a user