From 6052dbe8951e108e3a8d4c7b4493b920e60500fc Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Thu, 26 Jan 2023 22:29:26 +0100 Subject: Add robots.txt support --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 9105e84..204803a 100644 --- a/main.go +++ b/main.go @@ -600,6 +600,9 @@ func main() { http.HandleFunc("/upload", upload) http.HandleFunc("/download", download) http.HandleFunc("/imgs", imgs) + http.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, "./robots.txt") + }) http.HandleFunc("/admin", admin) http.HandleFunc("/admin/users", adminUsers) log.Printf("Serving http://localhost:%d\n", *p) -- cgit v1.2.3