diff --git a/CHANGELOG.md b/CHANGELOG.md index ae7f4b2..a6dc40e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.2.0] - 2020-05-09 + + ### Changed + + - Improved image cache-control to 1y + ## [2.1.0] - 2020-05-08 ### Changed @@ -87,7 +93,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Starting develop unit test with jest -[unreleased]: https://github.com/apoca/lambda-resize-image/compare/v2.1.0...HEAD +[unreleased]: https://github.com/apoca/lambda-resize-image/compare/v2.2.0...HEAD +[2.2.0]: https://github.com/apoca/lambda-resize-image/compare/v2.1.0..v2.2.0 [2.1.0]: https://github.com/apoca/lambda-resize-image/compare/v2.0.1..v2.1.0 [2.0.1]: https://github.com/apoca/lambda-resize-image/compare/v2.0.0..v2.0.1 [2.0.0]: https://github.com/apoca/lambda-resize-image/compare/v1.3.3..v2.0.0 diff --git a/package.json b/package.json index 9848963..58cd9d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lambda-resize-image", - "version": "2.1.0", + "version": "2.2.0", "description": "An AWS Lambda Function to resize images automatically with API Gateway and S3 for imagemagick tasks. When an image is called on AWS Api Gateway, this package will resize it and send it to the S3.", "main": "src/handler.js", "engines": { diff --git a/src/handler.js b/src/handler.js index 5c0a720..b62d725 100644 --- a/src/handler.js +++ b/src/handler.js @@ -66,6 +66,7 @@ export function imageprocess(event, context, callback) { statusCode: 200, headers: { 'Content-Type': 'image/jpeg', + 'Cache-Control': 'public, max-age=31536000', }, body: buffer.toString('base64'), isBase64Encoded: true, @@ -111,6 +112,7 @@ export function imageprocess(event, context, callback) { statusCode: 200, headers: { 'Content-Type': 'image/jpeg', + 'Cache-Control': 'public, max-age=31536000', }, body: buffer.toString('base64'), isBase64Encoded: true,