From ad07e38f9510f3507a533c08d9dd15b9e3232d10 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 11 May 2020 16:27:06 -0400 Subject: [PATCH] need to set cache control --- bloat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bloat.go b/bloat.go index e927a27..003a035 100644 --- a/bloat.go +++ b/bloat.go @@ -17,10 +17,10 @@ package main import ( "fmt" - "regexp" "image" "image/png" "net/http" + "regexp" "strconv" "strings" @@ -52,6 +52,7 @@ func bloat_showflag(writer http.ResponseWriter, req *http.Request) { img.Pix[p+3] = 255 } } + writer.Header().Set("Cache-Control", "max-age="+somedays()) png.Encode(writer, img) } @@ -78,4 +79,3 @@ func bloat_renderflags(h *Honk) { return fmt.Sprintf(``, "flag", src) }) } -