Iterate through a bucket, checking whether headers need updating,
and updating them when necessary.
const Update = require('s3-set-headers')
Update({
secret: '',
key: '',
bucket: '',
prefix: '',
concurrency: 5,
test(key, headers) {
return !headers['cache-control']
},
update(key, headers) {
return {
'cache-control': 'public, max-age=3600',
'x-amz-acl': 'public-read',
}
}
})