diff --git a/README.md b/README.md index df5a95e..9c1a11d 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ The client specified MUST implement functions called `getObject` and `putObject` Sets the `Cache-Control` header on the uploaded files. -*Default:* `max-age=63072000, public` +*Default:* `max-age=63072000, public, immutable` ### expires diff --git a/index.js b/index.js index 9db551b..ba3cde5 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ module.exports = { prefix: '', profile: '', acl: 'public-read', - cacheControl: 'max-age='+TWO_YEAR_CACHE_PERIOD_IN_SEC+', public', + cacheControl: 'max-age='+TWO_YEAR_CACHE_PERIOD_IN_SEC+', public, immutable', expires: EXPIRE_IN_2030, dotFolders: false, batchSize: 0, diff --git a/tests/index-test.js b/tests/index-test.js index 7435c9c..b0a034b 100644 --- a/tests/index-test.js +++ b/tests/index-test.js @@ -197,7 +197,7 @@ describe('s3 plugin', function() { assert.equal(context.config.s3.filePattern, '**/*.{js,css,png,gif,ico,jpg,webp,map,xml,txt,svg,swf,eot,ttf,woff,woff2,otf,wasm,json}'); assert.equal(context.config.s3.prefix, ''); - assert.equal(context.config.s3.cacheControl, 'max-age=63072000, public'); + assert.equal(context.config.s3.cacheControl, 'max-age=63072000, public, immutable'); assert.equal(new Date(context.config.s3.expires).getTime(), new Date('Tue, 01 Jan 2030 00:00:00 GMT').getTime()); }); });