diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-15 10:09:17 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-15 10:09:17 -0400 |
commit | 0f037b430a99a10cc9cff6f04dd1cf197ecc04ba (patch) | |
tree | 62890bc922d075fdf63f4ad665d9553c8f3ba237 /cmd | |
parent | 632b1b694dc7eb598b552476bb5f76e90c13b25a (diff) | |
download | gitea-0f037b430a99a10cc9cff6f04dd1cf197ecc04ba.tar.gz gitea-0f037b430a99a10cc9cff6f04dd1cf197ecc04ba.zip |
Fix #464
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cmd/web.go b/cmd/web.go index e703807643..a9ff9dbcc2 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -124,7 +124,7 @@ func runWeb(*cli.Context) { // Routers. m.Get("/", ignSignIn, routers.Home) - m.Get("/explore", routers.Explore) + m.Get("/explore", ignSignIn, routers.Explore) m.Get("/install", bindIgnErr(auth.InstallForm{}), routers.Install) m.Post("/install", bindIgnErr(auth.InstallForm{}), routers.InstallPost) m.Group("", func(r *macaron.Router) { @@ -355,11 +355,9 @@ func runWeb(*cli.Context) { }, ignSignIn, middleware.RepoAssignment(true, true)) m.Group("/:username", func(r *macaron.Router) { - r.Get("/:reponame", middleware.RepoAssignment(true, true, true), repo.Home) - m.Group("/:reponame", func(r *macaron.Router) { - r.Any("/*", repo.Http) - }) - }, ignSignInAndCsrf) + r.Get("/:reponame", ignSignIn, middleware.RepoAssignment(true, true, true), repo.Home) + r.Any("/:reponame/*", ignSignInAndCsrf, repo.Http) + }) // Not found handler. m.NotFound(routers.NotFound) |