[Bug]: @remix-run/serve sets high max-age
and immutable
cache header on everything
#903
Closed
1 of 12 tasks
Labels
bug
Something isn't working
Which Remix packages are impacted?
remix
(Remix core)create-remix
@remix-run/architect
@remix-run/cloudflare-workers
@remix-run/dev
@remix-run/express
@remix-run/netlify
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/vercel
What version of Remix are you using?
1.0.4
What version of Node are you using? Minimum supported version is 14.
16.13.0
Steps to Reproduce
public
(remix blog)public
folder is served with a highmax-age
andimmutable
Expected Behavior
Only files in
public/build
should have long, immutable caching as they are fingerprinted. Theexpress
starter template separates the two (although it has issues with the ordering ofexpress.static
as shown in #677 and fixed in #678):remix/packages/create-remix/templates/express/server/index.js
Lines 13 to 17 in 57949fe
Files in the base
public
folder should have a lowmax-age
of1h
like elsewhere so that favicons, images, fonts, etc. can be updated as needed.Actual Behavior
Due to this line everything in
public
gets the same cache headers:remix/packages/remix-serve/index.ts
Line 10 in 57949fe
This is fine for the built application files in
public/build
as they are fingerprinted but not for resources likefavicon.ico
that might need to change.The text was updated successfully, but these errors were encountered: