From 066a6806bdd585d44755c72c3cc8f14b50d08560 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 14 Nov 2021 23:25:45 -0500 Subject: [PATCH] don't cache avatar in debugmode --- web.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web.go b/web.go index 2c6f65b..107f929 100644 --- a/web.go +++ b/web.go @@ -2105,7 +2105,9 @@ func avatate(w http.ResponseWriter, r *http.Request) { } n := r.FormValue("a") a := genAvatar(n) - w.Header().Set("Cache-Control", "max-age="+somedays()) + if !debugMode { + w.Header().Set("Cache-Control", "max-age="+somedays()) + } w.Write(a) }