1
1
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:
Unknwon
2015-08-08 01:04:12 +08:00
parent 45adb9b7a3
commit 3d0583df0f
4 changed files with 26 additions and 5 deletions

View File

@@ -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