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:
Łukasz Mierzwa
2019-01-18 20:51:22 +00:00
parent 8d15b86949
commit 42ae5bb70e

View File

@@ -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