aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-09-09 20:14:48 +0800
committerGitHub <noreply@github.com>2020-09-09 20:14:48 +0800
commit594a2dc41f6e70f0cc535b125316d05e12666fda (patch)
tree3c057919672661de65c908f92186c744f6417c86 /internal/cmd
parent06193ed825094581da4fb5550804d7445fc5ae13 (diff)
web: correctly serving go-get pages for subdirs (#6318)
* web: correctly serving go-get page for subdirs * Update CHANGELOG * Fix golint error
Diffstat (limited to 'internal/cmd')
-rw-r--r--internal/cmd/web.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/cmd/web.go b/internal/cmd/web.go
index 43b9dfc5..09c173f4 100644
--- a/internal/cmd/web.go
+++ b/internal/cmd/web.go
@@ -611,7 +611,7 @@ func runWeb(c *cli.Context) error {
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.MustBeNotBare, context.RepoRef(), repo.CompareDiff)
}, ignSignIn, context.RepoAssignment())
m.Group("/:username/:reponame", func() {
- m.Get("", repo.Home)
+ m.Get("", context.ServeGoGet(), repo.Home)
m.Get("/stars", repo.Stars)
m.Get("/watchers", repo.Watchers)
}, ignSignIn, context.RepoAssignment(), context.RepoRef())
@@ -659,7 +659,7 @@ func runWeb(c *cli.Context) error {
lfs.RegisterRoutes(m.Router)
})
- m.Route("/*", "GET,POST,OPTIONS", repo.HTTPContexter(), repo.HTTP)
+ m.Route("/*", "GET,POST,OPTIONS", context.ServeGoGet(), repo.HTTPContexter(), repo.HTTP)
})
// ***************************