Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static handler options for max age by media type or file extension #2430

Open
tsegismont opened this issue May 31, 2023 · 1 comment
Open
Milestone

Comments

@tsegismont
Copy link
Contributor

The static handler can be configured with setMaxAgeSeconds to define a default value for caching headers.

This value will be used for any file regardless of its content type or extensions.

In projects were the frontend assets are created with a framework (e.g React/Vuejs), javascript and css files have their names changed by the build. It is fine to have browsers cache them longer (e.g one year).

So being able to configure the max age depending on the file extension or media type would help.

@tsegismont tsegismont added this to the 5.0.0 milestone May 31, 2023
@tsegismont
Copy link
Contributor Author

@pmlopes wdyt ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant