1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-15 14:44:41 +00:00

wrapper the middleware

This commit is contained in:
Lunny Xiao 2024-04-19 14:03:12 +08:00
parent 07e765c63d
commit e6b860e28f
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -246,7 +246,9 @@ func Routes() *web.Route {
if err != nil { if err != nil {
log.Fatal("GzipHandlerWithOpts failed: %v", err) log.Fatal("GzipHandlerWithOpts failed: %v", err)
} }
mid = append(mid, wrapper) mid = append(mid, func(h http.Handler) http.Handler {
return wrapper(h)
})
} }
if setting.Service.EnableCaptcha { if setting.Service.EnableCaptcha {