diff options
Diffstat (limited to 'routers/routes/web.go')
-rw-r--r-- | routers/routes/web.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/routes/web.go b/routers/routes/web.go index cbd7c0b7ca..3fecb4dbbe 100644 --- a/routers/routes/web.go +++ b/routers/routes/web.go @@ -88,10 +88,6 @@ func commonMiddlewares() []func(http.Handler) http.Handler { next.ServeHTTP(resp, req) }) }) - - if setting.EnableAccessLog { - handlers = append(handlers, accessLogger()) - } return handlers } @@ -168,6 +164,10 @@ func WebRoutes() *web.Route { r.Use(context.Contexter()) // Removed: SetAutoHead allow a get request redirect to head if get method is not exist + if setting.EnableAccessLog { + r.Use(context.AccessLogger()) + } + r.Use(user.GetNotificationCount) r.Use(repo.GetActiveStopwatch) r.Use(func(ctx *context.Context) { |