fix(ui): Set Cache-Control: no-cache on index.html - #5766 (#5767)

* fix(serve_index): Set Cache-Control: no-cache on index.html - #5766

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* fix(serve_index): Set Cache-Control: no-cache, no-store and must-revalidate on index.html - #5766

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

---------

Signed-off-by: apkatsikas <apkatsikas@gmail.com>
This commit is contained in:
Andrew Katsikas 2026-07-12 12:25:23 -04:00 committed by GitHub
parent be10f89c11
commit a5efba9a08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,6 +107,7 @@ func serveIndex(ds model.DataStore, fs fs.FS, shareInfo *model.Share) http.Handl
addShareData(r, data, shareInfo)
w.Header().Set("Content-Type", "text/html")
w.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate")
err = t.Execute(w, data)
if err != nil {
log.Error(r, "Could not execute `index.html` template", err)