From 121bbd538a1edde86be1291e33ab69c39298ee1c Mon Sep 17 00:00:00 2001 From: Mac Chaffee Date: Tue, 29 Oct 2024 22:35:02 -0400 Subject: [PATCH] Disable caching for html files so analytics work --- pgs/web_asset_handler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pgs/web_asset_handler.go b/pgs/web_asset_handler.go index 699fda4c..45cc68ec 100644 --- a/pgs/web_asset_handler.go +++ b/pgs/web_asset_handler.go @@ -248,6 +248,8 @@ func (h *ApiAssetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { logger.Error("could not record analytics view", "err", err) } } + // Ensure the page isn't cached so all views are counted + w.Header().Set("cache-control", "no-cache") } logger.Info(