Skip to content

Commit

Permalink
clarify frontend files cache policy
Browse files Browse the repository at this point in the history
Previously Cache-Control was set to "max-age=3600, no-cache",
but max-age is not used in case no-cache is set.
  • Loading branch information
paskal committed Jan 13, 2024
1 parent cbd7386 commit 7cc7ce4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/app/rest/api/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ func addFileServer(r chi.Router, embedFS embed.FS, webRoot, version string) {
http.NotFound(w, r)
return
}
// without it it would be set to "max-age=3600, no-cache" which is redundant
w.Header().Set("Cache-Control", "no-cache")
webFS.ServeHTTP(w, r)
})
}
Expand Down

0 comments on commit 7cc7ce4

Please sign in to comment.