aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/repo.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-03-21 20:02:34 +0800
committerGitHub <noreply@github.com>2024-03-21 12:02:34 +0000
commit01500957c29f6bfa2396b8457dbb0645edaafa99 (patch)
treeb5910bfb189c687654b394c22a44ddef1857342c /routers/web/repo/repo.go
parent0b4ff15356769db092fd7718da553e8a216c32fa (diff)
downloadgitea-01500957c29f6bfa2396b8457dbb0645edaafa99.tar.gz
gitea-01500957c29f6bfa2396b8457dbb0645edaafa99.zip
Refactor URL detection (#29960)
"Redirect" functions should only redirect if the target is for current Gitea site.
Diffstat (limited to 'routers/web/repo/repo.go')
-rw-r--r--routers/web/repo/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go
index 7f9bf3210a..0490feb621 100644
--- a/routers/web/repo/repo.go
+++ b/routers/web/repo/repo.go
@@ -371,7 +371,7 @@ func Action(ctx *context.Context) {
return
}
- ctx.RedirectToFirst(ctx.FormString("redirect_to"), ctx.Repo.RepoLink)
+ ctx.RedirectToCurrentSite(ctx.FormString("redirect_to"), ctx.Repo.RepoLink)
}
func acceptOrRejectRepoTransfer(ctx *context.Context, accept bool) error {