introduce concept of named middleware

This commit is contained in:
bergquist
2017-09-13 18:04:58 +02:00
committed by Carl Bergquist
parent 4bc6ecb241
commit 9c30bf53cf
3 changed files with 122 additions and 16 deletions

View File

@ -21,7 +21,7 @@ func (hs *HttpServer) registerRoutes() {
// automatically set HEAD for every GET
macaronR.SetAutoHead(true)
r := newRouteRegister()
r := newRouteRegister(middleware.RequestMetrics)
// not logged in views
r.Get("/", reqSignedIn, Index)