From 127b38babe062acdf0b5ef2498780d0540386eb4 Mon Sep 17 00:00:00 2001 From: Florian / sinnlosername Date: Fri, 28 Jul 2017 21:03:29 +0200 Subject: [PATCH 1/2] Update routes.go --- routers/routes/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 096daad8e210d..c0a2cd8021174 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -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.Status(404) } }) From af5ffcc820d8fd8854bb9e5616204a5d261c2b7f Mon Sep 17 00:00:00 2001 From: Florian / sinnlosername Date: Sat, 29 Jul 2017 22:05:50 +0200 Subject: [PATCH 2/2] Update routes.go --- routers/routes/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index c0a2cd8021174..a7a759538f16c 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -651,7 +651,7 @@ func RegisterRoutes(m *macaron.Macaron) { if setting.HasRobotsTxt { ctx.ServeFileContent(path.Join(setting.CustomPath, "robots.txt")) } else { - ctx.Status(404) + ctx.Handle(404, "", nil) } })