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

Feature/configurable expire headers for static assets #3289

Conversation

phoenix-bjoern
Copy link
Collaborator

Related issues

#3268

closes #

Short description and why it's useful

Added a new configuration expireHeaders to define max-age per mime type:

"expireHeaders": { "default": "30d", "application/json": "24h", "image/png": "7d" }

If there is no setting for the mime type it uses the default value.
Note that if the NODE_ENV isn't "production" the max-age setting will be 0 (which is helpful during development to not deal with browser cache invalidation). So to test the functionality you should switch to production mode.

Screenshots of visual changes before/after (if there are any)

Which environment this relates to

Check your case. In case of any doubts please read about Release Cycle

  • Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
  • RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
  • Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility and no breaking changes)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change

Contribution and currently important rules acceptance

Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature, i've seen that in action :)

@patzick patzick added the vs-hackathon Tasks for the Hackathon label Jul 26, 2019
Copy link
Contributor

@lukeromanowicz lukeromanowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome! one small improvement could be done but overall it's exactly what we need 👍

core/scripts/server.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vs-hackathon Tasks for the Hackathon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants