don't cache avatar in debugmode

This commit is contained in:
Ted Unangst 2021-11-14 23:25:45 -05:00
parent 493f5fc8f8
commit 066a6806bd
1 changed files with 3 additions and 1 deletions

4
web.go
View File

@ -2105,7 +2105,9 @@ func avatate(w http.ResponseWriter, r *http.Request) {
} }
n := r.FormValue("a") n := r.FormValue("a")
a := genAvatar(n) a := genAvatar(n)
w.Header().Set("Cache-Control", "max-age="+somedays()) if !debugMode {
w.Header().Set("Cache-Control", "max-age="+somedays())
}
w.Write(a) w.Write(a)
} }