Skip to content

Commit 27c2dcf

Browse files
sinnlosernameappleboy
authored andcommitted
Fixed robots.txt 404 error (#2226)
* Update routes.go * Update routes.go
1 parent 49df677 commit 27c2dcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/routes/routes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ func RegisterRoutes(m *macaron.Macaron) {
651651
if setting.HasRobotsTxt {
652652
ctx.ServeFileContent(path.Join(setting.CustomPath, "robots.txt"))
653653
} else {
654-
ctx.Error(404)
654+
ctx.Handle(404, "", nil)
655655
}
656656
})
657657

0 commit comments

Comments
 (0)