diff options
author | Unknwon <u@gogs.io> | 2015-07-31 14:25:12 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-07-31 14:25:12 +0800 |
commit | 4cd892c99f635919758d81479a1eed72fbe7ae5d (patch) | |
tree | 3ca79b2473dd3e0b13f558c6777e716622e78273 /cmd | |
parent | c44e1c7ca97ba53c23b253687bc6cb4b545d3173 (diff) | |
download | gitea-4cd892c99f635919758d81479a1eed72fbe7ae5d.tar.gz gitea-4cd892c99f635919758d81479a1eed72fbe7ae5d.zip |
fix #1227
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go index 90e8a7de91..5e03eda51b 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -464,7 +464,11 @@ func runWeb(ctx *cli.Context) { }, ignSignIn, middleware.RepoAssignment(true)) m.Group("/:username", func() { - m.Get("/:reponame", ignSignIn, middleware.RepoAssignment(true, true), middleware.RepoRef(), repo.Home) + m.Group("/:reponame", func() { + m.Get("", repo.Home) + m.Get(".git", repo.Home) + }, ignSignIn, middleware.RepoAssignment(true, true), middleware.RepoRef()) + m.Any("/:reponame/*", ignSignInAndCsrf, repo.Http) }) |