1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-03 04:25:25 +02:00

Fix regression for robots.txt and sitemap.xml

This commit is contained in:
Harvey Kandola 2022-10-21 11:13:03 -04:00
parent e0e3f0c141
commit 6993dc678f
2 changed files with 18 additions and 4 deletions

View file

@ -138,7 +138,7 @@ Disallow: /attachment/*
Sitemap: %s`, sitemap)
}
response.WriteBytes(w, []byte(robots))
response.WriteText(w, []byte(robots))
}
// Sitemap returns URLs that can be indexed.
@ -205,7 +205,7 @@ func (h *Handler) Sitemap(w http.ResponseWriter, r *http.Request) {
t := template.Must(template.New("tmp").Parse(sitemap))
t.Execute(buffer, &items)
response.WriteBytes(w, buffer.Bytes())
response.WriteXML(w, buffer.Bytes())
}
type sitemapItem struct {