1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-27 22:38:34 +09:00

Set Cache-Control to object-storage

This commit is contained in:
mei23 2018-07-26 16:06:43 +09:00
parent 951b693d17
commit e8783b15b1

View File

@ -25,7 +25,7 @@ async function save(readable: stream.Readable, name: string, type: string, hash:
const minio = new Minio.Client(config.drive.config);
const id = uuid.v4();
const obj = `${config.drive.prefix}/${id}`;
await minio.putObject(config.drive.bucket, obj, readable, size, { 'Content-Type': type });
await minio.putObject(config.drive.bucket, obj, readable, size, { 'Content-Type': type, 'Cache-Control': 'max-age=31536000, immutable' });
Object.assign(metadata, {
withoutChunks: true,