mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(backend): don't cache custom assets
Since those files can change at any time we should ensure that they are not cached
This commit is contained in:
@@ -78,6 +78,7 @@ func loadTemplate(t *template.Template, path string) *template.Template {
|
||||
}
|
||||
|
||||
func serveFileOr404(path string, contentType string, c *gin.Context) {
|
||||
c.Header("Cache-Control", "no-cache, no-store, must-revalidate")
|
||||
if path == "" {
|
||||
c.Data(200, contentType, nil)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user