Improve web UI sound deployment

This commit is contained in:
Storm Dragon committed 2026-05-21 22:56:24 -04:00
1 parent c3a9b05392
commit 439f65ec6c
2 files changed
+18 -2

No files matched your search

+11
View File
@@ -193,11 +193,22 @@ func makeCachable(w http.ResponseWriter, p string, fi os.FileInfo, cachable bool
cc := normalCacheControl
if strings.HasPrefix(p, "/third-party/") {
cc = veryCachableCacheControl
} else if isFirstPartyWebAsset(p) {
cc = "no-cache"
}
w.Header().Set("Cache-Control", cc)
}
func isFirstPartyWebAsset(p string) bool {
switch path.Ext(p) {
case ".css", ".html", ".js":
return true
default:
return false
}
}
// fileHandler is our custom reimplementation of http.FileServer
type fileHandler struct {
root http.FileSystem