Don't group js files with images in cache contral

That's because we want the bundle to be super-cached and immutable.
This commit is contained in:
Eli Ribble 2026-03-21 15:25:18 +00:00
parent 5d8314d13b
commit 228f4a6db9
No known key found for this signature in database

View file

@ -93,7 +93,7 @@ func fileServer(r chi.Router, path string, root http.FileSystem, embeddedFS embe
if config.IsProductionEnvironment() {
ext := filepath.Ext(requestedPath)
switch ext {
case ".css", ".js", ".jpg", ".jpeg", ".png", ".gif", ".svg", ".woff", ".woff2", ".ttf":
case ".css", ".jpg", ".jpeg", ".png", ".gif", ".svg", ".woff", ".woff2", ".ttf":
// Cache for 1 week (604800 seconds)
crw.Header().Set("Cache-Control", "public, max-age=604800, stale-while-revalidate=86400")
default: