diff options
| author | Julian Hurst <ark@mansus.space> | 2023-01-26 22:29:26 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2023-01-26 22:29:26 +0100 |
| commit | 6052dbe8951e108e3a8d4c7b4493b920e60500fc (patch) | |
| tree | 6cf48f92d4ec564e3a6f3ad9be71f6f24c659351 | |
| parent | 1eb03ae3bf16f755d8ab4b2697a65b06a1d83a5e (diff) | |
| download | docspace-6052dbe8951e108e3a8d4c7b4493b920e60500fc.tar.gz | |
Add robots.txt support
| -rw-r--r-- | main.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |
