Skip to content

Commit 0f23ae3

Browse files
committed
feat(tpl/dirTheme): require cache validate for each request
1 parent 42e2130 commit 0f23ae3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tpl/dirTheme.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ func (dir DirTheme) RenderPage(w io.Writer, data interface{}) error {
2727
}
2828

2929
func (dir DirTheme) RenderAsset(w http.ResponseWriter, r *http.Request, assetPath string) {
30+
header := w.Header()
31+
header.Set("Cache-Control", "public, max-age=0")
3032
filename := string(dir) + "/" + strings.Replace(path.Clean(assetPath), "../", "", -1)
3133
http.ServeFile(w, r, filename)
3234
}

0 commit comments

Comments
 (0)