Remove not working inline build directive

This commit is contained in:
Daniele Tonon
2023-07-14 18:54:02 +02:00
parent e52fe76c3d
commit d8fee0b4aa
4 changed files with 0 additions and 5 deletions

View File

@@ -31,8 +31,6 @@ func generate(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("Content-Type", "image/png")
// +build !nocache
w.Header().Set("Cache-Control", "max-age=604800")
if err := png.Encode(w, img); err != nil {

View File

@@ -10,7 +10,6 @@ import (
func proxy(w http.ResponseWriter, r *http.Request) {
fmt.Println(r.URL.Path, ":~", r.Header.Get("user-agent"))
// +build !nocache
w.Header().Set("Cache-Control", "max-age=604800")
src := r.URL.Query().Get("src")

View File

@@ -309,7 +309,6 @@ func render(w http.ResponseWriter, r *http.Request) {
templateMapping[typ] = "other.html"
}
// +build !nocache
w.Header().Set("Cache-Control", "max-age=604800")
if err := tmpl.ExecuteTemplate(w, templateMapping[typ], params); err != nil {

View File

@@ -71,7 +71,6 @@ func renderRelayPage(w http.ResponseWriter, r *http.Request) {
"modifiedAt": lastEventAt.Format("2006-01-02T15:04:05Z07:00"),
}
// +build !nocache
w.Header().Set("Cache-Control", "max-age=604800")
if err := tmpl.ExecuteTemplate(w, templateMapping[typ], params); err != nil {