]> source.dussan.org Git - gitea.git/commitdiff
Handle urls with trailing slash (#14852)
authorNorwin <noerw@users.noreply.github.com>
Tue, 2 Mar 2021 16:23:36 +0000 (16:23 +0000)
committerGitHub <noreply@github.com>
Tue, 2 Mar 2021 16:23:36 +0000 (17:23 +0100)
routers/routes/web.go

index 9a1945ce0169e17c34b198532c6c40f89f251814..0130009059f4e81a611b5e64995eca60af1cc781 100644 (file)
@@ -65,6 +65,7 @@ func commonMiddlewares() []func(http.Handler) http.Handler {
                        })
                },
                middleware.RealIP,
+               middleware.StripSlashes,
        }
        if !setting.DisableRouterLog && setting.RouterLogLevel != log.NONE {
                if log.GetLogger("router").GetLevel() <= setting.RouterLogLevel {