aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2020-03-05 11:59:27 +0000
committerFelix Hanley <felix@userspace.com.au>2020-03-05 11:59:27 +0000
commit58ec0bacb661f705b02db9bb584a551d1864f71a (patch)
tree5012263a1d528b742f8535da06a4c5e64175a03c
parent6f21095f6d71e0d5e2b75e754f9b28e15a552d36 (diff)
downloadsws-58ec0bacb661f705b02db9bb584a551d1864f71a.tar.gz
sws-58ec0bacb661f705b02db9bb584a551d1864f71a.tar.bz2
Update cache-control
-rw-r--r--cmd/server/hits.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/server/hits.go b/cmd/server/hits.go
index 9adb455..36a1e83 100644
--- a/cmd/server/hits.go
+++ b/cmd/server/hits.go
@@ -53,6 +53,7 @@ func handleHitCounter(db sws.CounterStore) http.HandlerFunc {
}
// TODO restrict to site sites
w.Header().Set("Access-Control-Allow-Origin", "*")
+ w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Content-Type", "image/gif")
w.Write(gifBytes)
return
@@ -80,7 +81,6 @@ func handleCounter(addr string) http.HandlerFunc {
// TODO restrict to site sites
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Etag", etag)
- w.Header().Set("Cache-Control", "public")
w.Header().Set("Content-Type", "application/javascript")
if _, err := io.Copy(w, &buf); err != nil {