mirror of
https://github.com/go-gitea/gitea
synced 2025-08-02 23:58:35 +00:00
@@ -669,6 +669,10 @@ func Contexter() func(next http.Handler) http.Handler {
|
||||
var locale = middleware.Locale(resp, req)
|
||||
var startTime = time.Now()
|
||||
var link = setting.AppSubURL + strings.TrimSuffix(req.URL.EscapedPath(), "/")
|
||||
|
||||
chiCtx := chi.RouteContext(req.Context())
|
||||
chiCtx.RoutePath = req.URL.EscapedPath()
|
||||
|
||||
var ctx = Context{
|
||||
Resp: NewResponse(resp),
|
||||
Cache: mc.GetCache(),
|
||||
|
@@ -833,7 +833,7 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context
|
||||
setting.AppSubURL,
|
||||
strings.TrimSuffix(ctx.Req.URL.Path, ctx.Params("*")),
|
||||
ctx.Repo.BranchNameSubURL(),
|
||||
ctx.Repo.TreePath))
|
||||
util.PathEscapeSegments(ctx.Repo.TreePath)))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user