Change Cache-Control on responses to no-store (#37)
This commit is contained in:
parent
a7b32ce2a4
commit
d0f342e28a
1 changed files with 1 additions and 1 deletions
2
api.go
2
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{}) {
|
func (a apiServer) jsonResponse(res http.ResponseWriter, status int, response map[string]interface{}) {
|
||||||
res.Header().Set("Content-Type", "application/json")
|
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)
|
res.WriteHeader(status)
|
||||||
|
|
||||||
json.NewEncoder(res).Encode(response)
|
json.NewEncoder(res).Encode(response)
|
||||||
|
|
Loading…
Reference in a new issue