diff --git a/main.go b/main.go index 7938d0a..08a9f84 100644 --- a/main.go +++ b/main.go @@ -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) diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..77470cb --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file