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

Make it possible to configure the max age of assets served by the AssetServing middleware #221

Closed
ellmetha opened this issue Apr 9, 2024 · 0 comments

Comments

@ellmetha
Copy link
Member

ellmetha commented Apr 9, 2024

Description

Right now the way the Marten::Middleware::AssetServing middleware behaves can't be configured. This middleware hardcodes the max age of served assets (3600 seconds), and it is not possible to easily override it if necessary. Let's ensure that this value can be configured easily.

Proposition

Let's introduce a new assets.max_age setting. This setting should allow setting the max age as used in the Cache-Control header set by the Marten::Middleware::AssetServing middleware, and the default value should be 3600s. It should be made clear in the documentation that this setting only applies when the Marten::Middleware::AssetServing middleware is enabled.

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