1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-26 09:09:36 -05:00

Fixed robots.txt 404 error (#2226)

* Update routes.go

* Update routes.go
This commit is contained in:
Florian / sinnlosername 2017-07-30 16:32:10 +02:00 committed by Bo-Yi Wu
parent 49df677c47
commit 27c2dcf60e

View file

@ -651,7 +651,7 @@ func RegisterRoutes(m *macaron.Macaron) {
if setting.HasRobotsTxt {
ctx.ServeFileContent(path.Join(setting.CustomPath, "robots.txt"))
} else {
ctx.Error(404)
ctx.Handle(404, "", nil)
}
})