add cache directive saying that sitemaps are only valid for one hour.

This commit is contained in:
fiatjaf
2024-06-12 15:32:08 -03:00
parent 1eb3c45755
commit eec788101f

View File

@@ -71,6 +71,7 @@ func renderArchive(w http.ResponseWriter, r *http.Request) {
}
w.Header().Add("content-type", "text/xml")
w.Header().Set("Cache-Control", "public, max-age=3600")
w.Write([]byte(XML_HEADER))
SitemapTemplate.Render(w, &SitemapPage{
Host: s.Domain,