diff options
author | Unknwon <u@gogs.io> | 2015-08-08 01:04:12 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-08 01:04:12 +0800 |
commit | 3d0583df0f1704bc0e1c0d1348f2054515680fed (patch) | |
tree | d8a91c0075a73ce0249179c5ef02092dbc139a5c /cmd | |
parent | 45adb9b7a38cca896bf8fb3f27ccb29fc244b395 (diff) | |
download | gitea-3d0583df0f1704bc0e1c0d1348f2054515680fed.tar.gz gitea-3d0583df0f1704bc0e1c0d1348f2054515680fed.zip |
fix private repo cannot trigger hook by SSH
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go index 9e35698a4d..708ff59e70 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -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 |