Update pkg/web/server/routes.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Robin Olsen
2026-02-13 13:54:45 +01:00
committed by GitHub
parent f96d9527a6
commit 732db39faa

View File

@@ -46,7 +46,7 @@ func (s *Server) handleAssets(r chi.Router, assets embed.FS) {
r.Handle("/assets/*", http.StripPrefix("/assets/",
http.FileServer(http.Dir("pkg/web/assets"))))
r.HandleFunc("GET /robots.txt", func(w http.ResponseWriter, r *http.Request) {
r.Get("/robots.txt", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-cache")
http.ServeContent(w, r, "robots.txt", time.Now(), strings.NewReader("User-agent: *\nAllow: /"))
})