From b6e69cca5947316f6db58dbd4a336b7f993b058f Mon Sep 17 00:00:00 2001 From: Chris Park Date: Tue, 14 May 2024 09:07:14 +0930 Subject: [PATCH] let prerender response override cache-control header set, by matching the case --- packages/prerender-proxy/lib/handlers/cache-control.ts | 2 +- packages/prerender-proxy/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/prerender-proxy/lib/handlers/cache-control.ts b/packages/prerender-proxy/lib/handlers/cache-control.ts index 66236483..79f29d0f 100644 --- a/packages/prerender-proxy/lib/handlers/cache-control.ts +++ b/packages/prerender-proxy/lib/handlers/cache-control.ts @@ -12,7 +12,7 @@ export const handler = async ( const response = event.Records[0].cf.response; if (response.headers[`${cacheKey}`]) { - response.headers["Cache-Control"] = [ + response.headers["cache-control"] = [ { key: "Cache-Control", value: `max-age=${cacheMaxAge}`, diff --git a/packages/prerender-proxy/package.json b/packages/prerender-proxy/package.json index d8101804..8c307538 100644 --- a/packages/prerender-proxy/package.json +++ b/packages/prerender-proxy/package.json @@ -1,6 +1,6 @@ { "name": "@aligent/cdk-prerender-proxy", - "version": "0.1.7", + "version": "1.0.2", "description": "A Cloudfront Lambda@Edge stack for integrating with prerender.io", "main": "index.js", "scripts": {