summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-24 14:20:07 -0400
committerUnknwon <u@gogs.io>2015-09-24 14:20:07 -0400
commite787e73e2f8adc76cee471549fb04d7bbfd76b7d (patch)
tree3507bf7d2bc8236d35ec2e7811b5ad02ae23be60 /cmd
parent42a38dfca3ce5d2fde569b966ef4a733bec7f673 (diff)
downloadgitea-e787e73e2f8adc76cee471549fb04d7bbfd76b7d.tar.gz
gitea-e787e73e2f8adc76cee471549fb04d7bbfd76b7d.zip
fix URL match
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/web.go b/cmd/web.go
index cc8575978c..e78cb13a37 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -192,7 +192,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/explore", ignSignIn, routers.Explore)
m.Combo("/install", routers.InstallInit).Get(routers.Install).
Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost)
- m.Get("/:type(issues|pulls)", reqSignIn, user.Issues)
+ m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
// ***** START: API *****
// FIXME: custom form error response.
@@ -375,7 +375,7 @@ func runWeb(ctx *cli.Context) {
m.Group("/:org", func() {
m.Get("/dashboard", user.Dashboard)
- m.Get("/:type(issues|pulls)", user.Issues)
+ m.Get("/^:type(issues|pulls)$", user.Issues)
m.Get("/members", org.Members)
m.Get("/members/action/:action", org.MembersAction)
@@ -509,8 +509,8 @@ func runWeb(ctx *cli.Context) {
m.Group("/:username/:reponame", func() {
m.Get("/releases", middleware.RepoRef(), repo.Releases)
- m.Get("/:type(issues|pulls)", repo.RetrieveLabels, repo.Issues)
- m.Get("/:type(issues|pulls)/:index", repo.ViewIssue)
+ m.Get("/^:type(issues|pulls)$", repo.RetrieveLabels, repo.Issues)
+ m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)
m.Get("/labels/", repo.RetrieveLabels, repo.Labels)
m.Get("/milestones", repo.Milestones)
m.Get("/branches", repo.Branches)