mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-12 00:34:20 -04:00
Merge branch 'master' of github.com:gogits/gogs
This commit is contained in:
commit
91a1b55707
@ -20,5 +20,12 @@ func Home(ctx *middleware.Context) {
|
|||||||
|
|
||||||
func Help(ctx *middleware.Context) {
|
func Help(ctx *middleware.Context) {
|
||||||
ctx.Data["PageIsHelp"] = true
|
ctx.Data["PageIsHelp"] = true
|
||||||
|
ctx.Data["Title"] = "Help"
|
||||||
ctx.HTML(200, "help")
|
ctx.HTML(200, "help")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NotFound(ctx *middleware.Context) {
|
||||||
|
ctx.Data["PageIsNotFound"] = true
|
||||||
|
ctx.Data["Title"] = 404
|
||||||
|
ctx.Handle(404, "home.NotFound", nil)
|
||||||
|
}
|
||||||
|
3
web.go
3
web.go
@ -163,6 +163,9 @@ func runWeb(*cli.Context) {
|
|||||||
m.Get("/template/**", dev.TemplatePreview)
|
m.Get("/template/**", dev.TemplatePreview)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// not found handler
|
||||||
|
m.NotFound(routers.NotFound)
|
||||||
|
|
||||||
listenAddr := fmt.Sprintf("%s:%s",
|
listenAddr := fmt.Sprintf("%s:%s",
|
||||||
base.Cfg.MustValue("server", "HTTP_ADDR"),
|
base.Cfg.MustValue("server", "HTTP_ADDR"),
|
||||||
base.Cfg.MustValue("server", "HTTP_PORT", "3000"))
|
base.Cfg.MustValue("server", "HTTP_PORT", "3000"))
|
||||||
|
Loading…
Reference in New Issue
Block a user