return /metrics before session middleware

This commit is contained in:
bergquist
2017-09-14 14:26:32 +02:00
committed by Carl Bergquist
parent 6b1ae1a8a8
commit 6d22a67a30
6 changed files with 223 additions and 10 deletions
-6
View File
@@ -6,7 +6,6 @@ import (
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// Register adds http routes
@@ -98,8 +97,6 @@ func (hs *HttpServer) registerRoutes() {
// api renew session based on remember cookie
r.Get("/api/login/ping", quota("session"), LoginApiPing)
r.Get("/metrics", promhttp.Handler())
// authed api
r.Group("/api", func() {
@@ -266,9 +263,6 @@ func (hs *HttpServer) registerRoutes() {
r.Get("/tsdb/testdata/gensql", reqGrafanaAdmin, wrap(GenerateSqlTestData))
r.Get("/tsdb/testdata/random-walk", wrap(GetTestDataRandomWalk))
// metrics
//r.Get("/metrics", wrap(GetInternalMetrics))
r.Group("/alerts", func() {
r.Post("/test", bind(dtos.AlertTestCommand{}), wrap(AlertTest))
r.Post("/:alertId/pause", bind(dtos.PauseAlertCommand{}), wrap(PauseAlert), reqEditorRole)