forked from forgejo/forgejo
fix private repo cannot trigger hook by SSH
This commit is contained in:
parent
45adb9b7a3
commit
3d0583df0f
4 changed files with 26 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue