summaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-23 13:48:01 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-23 13:48:01 +0800
commitbdd32f152d73f31beffa854fb7382072043ef235 (patch)
tree47b834dab6b6dfda465ca12849a09ca521a0014b /web.go
parent47493a0191f3de8aa4e80bce1911f14623cfa46a (diff)
downloadgitea-bdd32f152d73f31beffa854fb7382072043ef235.tar.gz
gitea-bdd32f152d73f31beffa854fb7382072043ef235.zip
add m.NotFound handler
Diffstat (limited to 'web.go')
-rw-r--r--web.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/web.go b/web.go
index bf654aace2..a0f9f7051a 100644
--- a/web.go
+++ b/web.go
@@ -163,6 +163,9 @@ func runWeb(*cli.Context) {
m.Get("/template/**", dev.TemplatePreview)
}
+ // not found handler
+ m.NotFound(routers.NotFound)
+
listenAddr := fmt.Sprintf("%s:%s",
base.Cfg.MustValue("server", "HTTP_ADDR"),
base.Cfg.MustValue("server", "HTTP_PORT", "3000"))