Skip to content

Commit 88d7334

Browse files
committed
add immutable to cache control header
1 parent 0154250 commit 88d7334

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ The client specified MUST implement functions called `getObject` and `putObject`
192192

193193
Sets the `Cache-Control` header on the uploaded files.
194194

195-
*Default:* `max-age=63072000, public`
195+
*Default:* `max-age=63072000, public, immutable`
196196

197197
### expires
198198

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
prefix: '',
2222
profile: '',
2323
acl: 'public-read',
24-
cacheControl: 'max-age='+TWO_YEAR_CACHE_PERIOD_IN_SEC+', public',
24+
cacheControl: 'max-age='+TWO_YEAR_CACHE_PERIOD_IN_SEC+', public, immutable',
2525
expires: EXPIRE_IN_2030,
2626
dotFolders: false,
2727
batchSize: 0,

tests/index-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ describe('s3 plugin', function() {
197197

198198
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}');
199199
assert.equal(context.config.s3.prefix, '');
200-
assert.equal(context.config.s3.cacheControl, 'max-age=63072000, public');
200+
assert.equal(context.config.s3.cacheControl, 'max-age=63072000, public, immutable');
201201
assert.equal(new Date(context.config.s3.expires).getTime(), new Date('Tue, 01 Jan 2030 00:00:00 GMT').getTime());
202202
});
203203
});

0 commit comments

Comments
 (0)