diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-01-27 22:56:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 22:56:54 +0800 |
commit | 41c0776568b3fa1bf825439103085146260e16a8 (patch) | |
tree | 84237872a82c15ec666a760dd648474fd6ff9ccb /routers/routes | |
parent | 669ff8e9b1c15d24dd30852588c2dbb3d82e0cd9 (diff) | |
download | gitea-41c0776568b3fa1bf825439103085146260e16a8.tar.gz gitea-41c0776568b3fa1bf825439103085146260e16a8.zip |
Fix captcha (#14488)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers/routes')
-rw-r--r-- | routers/routes/web.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/routes/web.go b/routers/routes/web.go index 6b6322f048..cbd7c0b7ca 100644 --- a/routers/routes/web.go +++ b/routers/routes/web.go @@ -161,7 +161,9 @@ func WebRoutes() *web.Route { mailer.InitMailRender(templates.Mailer()) - r.Use(captcha.Captchaer(context.GetImageCaptcha())) + if setting.Service.EnableCaptcha { + r.Use(captcha.Captchaer(context.GetImageCaptcha())) + } // Removed: toolbox.Toolboxer middleware will provide debug informations which seems unnecessary r.Use(context.Contexter()) // Removed: SetAutoHead allow a get request redirect to head if get method is not exist |