diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-01-27 02:04:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-26 19:04:20 +0100 |
commit | 0f726caf97e4b682172f23fb46d3992f60ed6ed2 (patch) | |
tree | a8e332dad27444a7d9f5908705a0fa4dc0022d46 /routers/routes/web.go | |
parent | afbddf1f0e93cf8b38a7244dfd434b448c81037d (diff) | |
download | gitea-0f726caf97e4b682172f23fb46d3992f60ed6ed2.tar.gz gitea-0f726caf97e4b682172f23fb46d3992f60ed6ed2.zip |
Fix panic 500 page rendering (#14474)
Diffstat (limited to 'routers/routes/web.go')
-rw-r--r-- | routers/routes/web.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/routes/web.go b/routers/routes/web.go index 2433618581..6b6322f048 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, |