Skip to content

Commit

Permalink
Improved image cache-control to 1y
Browse files Browse the repository at this point in the history
  • Loading branch information
apoca committed May 8, 2020
1 parent a2f1c3d commit b54b29a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 2 additions & 0 deletions src/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b54b29a

Please sign in to comment.