From d0f342e28a5831f058eb6ca4a5b0535dd62a1114 Mon Sep 17 00:00:00 2001 From: Vic Demuzere <65006+sorcix@users.noreply.github.com> Date: Mon, 9 Aug 2021 17:37:48 +0200 Subject: [PATCH] Change Cache-Control on responses to no-store (#37) --- api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.go b/api.go index 86e061d..06dc611 100644 --- a/api.go +++ b/api.go @@ -95,7 +95,7 @@ func (a apiServer) handleRead(res http.ResponseWriter, r *http.Request) { func (a apiServer) jsonResponse(res http.ResponseWriter, status int, response map[string]interface{}) { res.Header().Set("Content-Type", "application/json") - res.Header().Set("Cache-Control", "no-cache") + res.Header().Set("Cache-Control", "no-store, max-age=0") res.WriteHeader(status) json.NewEncoder(res).Encode(response)