Skip to content

Commit

Permalink
fix: Setting no cache but keeping etag
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed May 19, 2022
1 parent 568cb8c commit a9a34c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/crud/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (a App) serveGeoJSON(w http.ResponseWriter, r *http.Request, request provid
}

w.Header().Add("Content-Type", "application/json; charset=utf-8")
w.Header().Add("Cache-Control", "max-age=60, must-revalidate")
w.Header().Add("Cache-Control", "no-cache")
w.Header().Add("Etag", etag)
w.WriteHeader(http.StatusOK)

Expand Down
2 changes: 1 addition & 1 deletion pkg/thumbnail/thumbnail.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (a App) List(w http.ResponseWriter, r *http.Request, item absto.Item, items
}

w.Header().Add("Content-Type", "text/plain; charset=utf-8")
w.Header().Add("Cache-Control", "max-age=60, must-revalidate")
w.Header().Add("Cache-Control", "no-cache")
w.Header().Add("Etag", etag)
w.WriteHeader(http.StatusOK)

Expand Down

0 comments on commit a9a34c9

Please sign in to comment.