Skip to content

Re: @remix-run/serve sets high max-age and immutable cache header on everything #9353

Open
@kenteramin

Description

@kenteramin

Reproduction

  1. Create a remix app
  2. Run build then start
  3. Open the page
  4. Check the headers on the /favicon.ico request

The favicon from /public comes with Cache-Control: public, max-age=31536000, immutable

System Info

remix 2.9.1

Used Package Manager

npm

Expected Behavior

The server config from
https://github.com/remix-run/remix/blob/main/packages/remix-serve/cli.ts
says app.use(express.static("public", { maxAge: "1h" }));.
So it is expected to have maxAge=1h

Actual Behavior

We actually get an immutable maxAge=1y

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions