fix: avoid stale admin asset cache
This commit is contained in:
@@ -40,6 +40,8 @@ func (s *sHook) setAdminStaticCacheHeader(r *ghttp.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(path, "/admin/assets/") {
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user