Commit 97ff7573 by Dominik Prokop Committed by GitHub

Routing: Update routing to require sign in on every route (#19118)

* Update routing to require sign in on every route

* Review update
parent a28aefa3
......@@ -24,7 +24,6 @@ func (hs *HTTPServer) registerRoutes() {
r := hs.RouteRegister
// not logged in views
r.Get("/", reqSignedIn, hs.Index)
r.Get("/logout", hs.Logout)
r.Post("/login", quota("session"), bind(dtos.LoginCommand{}), Wrap(hs.LoginPost))
r.Get("/login/:name", quota("session"), hs.OAuthLogin)
......@@ -422,4 +421,6 @@ func (hs *HTTPServer) registerRoutes() {
r.Get("/api/snapshots/:key", GetDashboardSnapshot)
r.Get("/api/snapshots-delete/:deleteKey", reqSnapshotPublicModeOrSignedIn, Wrap(DeleteDashboardSnapshotByDeleteKey))
r.Delete("/api/snapshots/:key", reqEditorRole, Wrap(DeleteDashboardSnapshot))
r.Get("/*", reqSignedIn, hs.Index)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment