mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
fix private repo cannot trigger hook by SSH
This commit is contained in:
@@ -461,7 +461,6 @@ func runWeb(ctx *cli.Context) {
|
||||
m.Get("/branches", repo.Branches)
|
||||
m.Get("/archive/*", repo.Download)
|
||||
m.Get("/pulls2/", repo.PullRequest2)
|
||||
m.Head("/hooks/trigger", repo.TriggerHook)
|
||||
|
||||
m.Group("", func() {
|
||||
m.Get("/src/*", repo.Home)
|
||||
@@ -479,7 +478,10 @@ func runWeb(ctx *cli.Context) {
|
||||
m.Get(".git", repo.Home)
|
||||
}, ignSignIn, middleware.RepoAssignment(true, true), middleware.RepoRef())
|
||||
|
||||
m.Any("/:reponame/*", ignSignInAndCsrf, repo.Http)
|
||||
m.Group("/:reponame", func() {
|
||||
m.Any("/*", ignSignInAndCsrf, repo.Http)
|
||||
m.Head("/hooks/trigger", repo.TriggerHook)
|
||||
})
|
||||
})
|
||||
|
||||
// robots.txt
|
||||
|
Reference in New Issue
Block a user