Add robots.txt

This commit is contained in:
video-prize-ranch 2022-01-21 18:35:12 -05:00
parent 5227716bd8
commit 6798c2f42f
No known key found for this signature in database
GPG Key ID: D8EAA4C5B12A7281
2 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,12 @@ func main() {
Root: http.FS(static.GetFiles()),
}))
app.Get("/robots.txt", func(c *fiber.Ctx) error {
file, _ := static.GetFiles().ReadFile("robots.txt")
_, err := c.Write(file)
return err
})
app.Get("/", pages.FrontpageHandler)
app.Get("/:baseName.:extension", pages.HandleMedia)
app.Get("/a/:galleryID", pages.HandleGallery)

2
static/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /