feat: add immutable cache policy for versioned static assets

This commit is contained in:
2026-07-03 16:16:13 +02:00
parent 11bdd9751b
commit 1af0ec351d

View File

@@ -69,6 +69,8 @@ func staticCachePolicy(r *http.Request) string {
return "public, max-age=31536000, immutable"
}
return "public, max-age=0, must-revalidate"
case strings.HasPrefix(path, "/static/assets/") && r.URL.Query().Get("v") != "":
return "public, max-age=31536000, immutable"
case strings.HasPrefix(path, "/static/assets/") && isImagePath(path):
return "public, max-age=86400"
default: