Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/host/config/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ module.exports = function (deployTarget) {
deployTarget === 's3-preview-production'
) {
ENV.s3.prefix = process.env.PR_BRANCH_NAME;
// Previews should always serve the latest build for the PR, so a reviewer
// returning later sees current state without a shift-refresh. The default
// is `max-age=63072000, public` plus a 2029 Expires, which pins assets in
// the browser for ~2 years.
ENV.s3.cacheControl = 'no-cache, max-age=0, must-revalidate';
ENV.s3.expires = new Date(0);
}

return ENV;
Expand Down
Loading