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 Feb 5, 2023
1 parent a55fadd commit 62e6e1e
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 @@ -491,6 +491,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 62e6e1e

Please sign in to comment.