Skip to content

Commit

Permalink
add immutable to cache control header
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanCrotaz committed Oct 26, 2022
1 parent 0154250 commit 88d7334
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
});
Expand Down

0 comments on commit 88d7334

Please sign in to comment.