mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Backport #15292 Simplify the web.go FCGI path by moving the req.URL.Path fix-up to listener Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -168,15 +168,6 @@ func WebRoutes() *web.Route {
|
||||
r.Use(h)
|
||||
}
|
||||
|
||||
if (setting.Protocol == setting.FCGI || setting.Protocol == setting.FCGIUnix) && setting.AppSubURL != "" {
|
||||
r.Use(func(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
|
||||
req.URL.Path = strings.TrimPrefix(req.URL.Path, setting.AppSubURL)
|
||||
next.ServeHTTP(resp, req)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
mailer.InitMailRender(templates.Mailer())
|
||||
|
||||
if setting.Service.EnableCaptcha {
|
||||
|
Reference in New Issue
Block a user