summaryrefslogtreecommitdiffstats
path: root/routers/routes/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/routes/routes.go')
-rw-r--r--routers/routes/routes.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index d085a0910e..096daad8e2 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -590,11 +590,14 @@ func RegisterRoutes(m *macaron.Macaron) {
}, repo.MustAllowPulls, context.CheckUnit(models.UnitTypePullRequests))
m.Group("", func() {
- m.Get("/src/*", repo.SetEditorconfigIfExists, repo.Home)
m.Get("/raw/*", repo.SingleDownload)
m.Get("/commits/*", repo.RefCommits)
m.Get("/graph", repo.Graph)
m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff)
+ }, repo.MustBeNotBare, context.RepoRef(), context.CheckUnit(models.UnitTypeCode))
+
+ m.Group("", func() {
+ m.Get("/src/*", repo.SetEditorconfigIfExists, repo.Home)
m.Get("/forks", repo.Forks)
}, context.RepoRef(), context.CheckUnit(models.UnitTypeCode))
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.MustBeNotBare, repo.RawDiff, context.CheckUnit(models.UnitTypeCode))