Disable cache-control header on nocache tag

This commit is contained in:
Daniele Tonon
2023-07-12 22:11:21 +02:00
parent 2d540b91b4
commit 0cad5a662a
4 changed files with 8 additions and 0 deletions

View File

@@ -67,7 +67,9 @@ func renderRelayPage(w http.ResponseWriter, r *http.Request) {
"lastNotes": renderableLastNotes,
}
// +build !nocache
w.Header().Set("Cache-Control", "max-age=604800")
if err := tmpl.ExecuteTemplate(w, templateMapping["relay"], params); err != nil {
log.Error().Err(err).Msg("error rendering")
return