Update pkg/web/server/routes.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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: /"))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user