Add robots.txt
This commit is contained in:
parent
5227716bd8
commit
6798c2f42f
6
main.go
6
main.go
|
@ -43,6 +43,12 @@ func main() {
|
||||||
Root: http.FS(static.GetFiles()),
|
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("/", pages.FrontpageHandler)
|
||||||
app.Get("/:baseName.:extension", pages.HandleMedia)
|
app.Get("/:baseName.:extension", pages.HandleMedia)
|
||||||
app.Get("/a/:galleryID", pages.HandleGallery)
|
app.Get("/a/:galleryID", pages.HandleGallery)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
Loading…
Reference in New Issue