Skip to content

Commit

Permalink
api: fix missing cache-control header for get tiddler
Browse files Browse the repository at this point in the history
  • Loading branch information
cs8425 committed Dec 2, 2023
1 parent 737f74e commit 87c9d70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ func (wiki *Wiki) getTiddler(w http.ResponseWriter, r *http.Request) {
// skip title due to not used and escape issue
etag := fmt.Sprintf(`"%v/%v/%v:%v"`, wiki.Recipe, "", td.Rev, hash) // recipe, title, revision, hash/checksum
h := w.Header()
h.Set("Cache-Control", "max-age=0, must-revalidate")
h.Set("Content-Type", "application/json")
if useCache {
h.Set("Etag", etag)
Expand Down

0 comments on commit 87c9d70

Please sign in to comment.