Skip to content

Commit b54b29a

Browse files
author
apoca
committed
Improved image cache-control to 1y
1 parent a2f1c3d commit b54b29a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.2.0] - 2020-05-09
11+
12+
### Changed
13+
14+
- Improved image cache-control to 1y
15+
1016
## [2.1.0] - 2020-05-08
1117

1218
### Changed
@@ -87,7 +93,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8793

8894
- Starting develop unit test with jest
8995

90-
[unreleased]: https://github.com/apoca/lambda-resize-image/compare/v2.1.0...HEAD
96+
[unreleased]: https://github.com/apoca/lambda-resize-image/compare/v2.2.0...HEAD
97+
[2.2.0]: https://github.com/apoca/lambda-resize-image/compare/v2.1.0..v2.2.0
9198
[2.1.0]: https://github.com/apoca/lambda-resize-image/compare/v2.0.1..v2.1.0
9299
[2.0.1]: https://github.com/apoca/lambda-resize-image/compare/v2.0.0..v2.0.1
93100
[2.0.0]: https://github.com/apoca/lambda-resize-image/compare/v1.3.3..v2.0.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lambda-resize-image",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"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.",
55
"main": "src/handler.js",
66
"engines": {

src/handler.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export function imageprocess(event, context, callback) {
6666
statusCode: 200,
6767
headers: {
6868
'Content-Type': 'image/jpeg',
69+
'Cache-Control': 'public, max-age=31536000',
6970
},
7071
body: buffer.toString('base64'),
7172
isBase64Encoded: true,
@@ -111,6 +112,7 @@ export function imageprocess(event, context, callback) {
111112
statusCode: 200,
112113
headers: {
113114
'Content-Type': 'image/jpeg',
115+
'Cache-Control': 'public, max-age=31536000',
114116
},
115117
body: buffer.toString('base64'),
116118
isBase64Encoded: true,

0 commit comments

Comments
 (0)