fix: avoid stale admin asset cache

This commit is contained in:
richjohnrambo
2026-09-24 01:01:57 +08:00
parent 369898bd7c
commit 32017a2fbf
+3 -1
View File
@@ -40,6 +40,8 @@ func (s *sHook) setAdminStaticCacheHeader(r *ghttp.Request) {
return
}
if strings.HasPrefix(path, "/admin/assets/") {
r.Response.Header().Set("Cache-Control", "public, max-age=31536000, immutable")
r.Response.Header().Set("Cache-Control", "no-cache, must-revalidate")
r.Response.Header().Set("Pragma", "no-cache")
r.Response.Header().Set("Expires", "0")
}
}