Skip to content

Commit

Permalink
Disable caching for html files so analytics work
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-chaffee committed Nov 16, 2024
1 parent 8680ed3 commit 121bbd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pgs/web_asset_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 121bbd5

Please sign in to comment.