From 5d3f8448a5c234195499959fc65d98935d2179e0 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 27 Jan 2021 00:29:34 +0800 Subject: [PATCH] Fix panic 500 page rendering --- routers/routes/web.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/routes/web.go b/routers/routes/web.go index 24336185817f0..6b6322f048fc7 100644 --- a/routers/routes/web.go +++ b/routers/routes/web.go @@ -101,7 +101,6 @@ func NormalRoutes() *web.Route { for _, middle := range commonMiddlewares() { r.Use(middle) } - r.Use(Recovery()) r.Mount("/", WebRoutes()) r.Mount("/api/v1", apiv1.Routes()) @@ -124,6 +123,8 @@ func WebRoutes() *web.Route { Domain: setting.SessionConfig.Domain, })) + r.Use(Recovery()) + r.Use(public.Custom( &public.Options{ SkipLogging: setting.DisableRouterLog,