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

Configurable lifetime for static files #8

Merged

Conversation

robertlemke
Copy link
Member

This change introduces a new environment variable
NGINX_STATIC_FILES_LIFETIME which allows for configuration of the
cache lifetime controlled through the HTTP response's "expires"
header. The default expiration time is now 30 days.

Apart from Flow's static resources, additional files in the top
directory are now covered (favicon.ico, apple-touch-icon.* etc).

Resolves #7

This change introduces a new environment variable
NGINX_STATIC_FILES_LIFETIME which allows for configuration of the
cache lifetime controlled through the HTTP response's "expires"
header. The default expiration time is now 30 days.

Apart from Flow's static resources, additional files in the top
directory are now covered (favicon.ico, apple-touch-icon.* etc).

Resolves #7
@robertlemke robertlemke linked an issue May 4, 2022 that may be closed by this pull request
@robertlemke
Copy link
Member Author

Ah, this also fixes the issue in Local Beach where requests to non-existing static files would end up triggering a request in Flow / Neos. Now missing static files just end up in a 404 directly.

@robertlemke
Copy link
Member Author

I will merge and test this in a beta setup and don't communicate the variable names to customers yet, to see if the cache lifetime configuration works in production as expected.

@robertlemke robertlemke merged commit 682db40 into main May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make cache lifetime for static files configurable
2 participants