mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-12-11 05:51:57 +01:00
Fixed robots.txt 404 error (#2226)
* Update routes.go * Update routes.go
This commit is contained in:
parent
49df677c47
commit
27c2dcf60e
1 changed files with 1 additions and 1 deletions
|
@ -651,7 +651,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||||
if setting.HasRobotsTxt {
|
if setting.HasRobotsTxt {
|
||||||
ctx.ServeFileContent(path.Join(setting.CustomPath, "robots.txt"))
|
ctx.ServeFileContent(path.Join(setting.CustomPath, "robots.txt"))
|
||||||
} else {
|
} else {
|
||||||
ctx.Error(404)
|
ctx.Handle(404, "", nil)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue