From ae0b2735e4e7abc7d03ec68b23e9e0ef2abc55fc Mon Sep 17 00:00:00 2001 From: GuillaumeSD Date: Sat, 17 May 2025 17:28:29 +0200 Subject: [PATCH] fix : page files cache control --- cdk/app-stack.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cdk/app-stack.ts b/cdk/app-stack.ts index 654e092..3acd26d 100644 --- a/cdk/app-stack.ts +++ b/cdk/app-stack.ts @@ -56,11 +56,11 @@ export class AppStack extends cdk.Stack { exclude: ["engines"], }), ], - exclude: pagePaths, + exclude: [...pagePaths, "*.html"], memoryLimit: 512, cacheControl: [ CacheControl.setPublic(), - CacheControl.maxAge(cdk.Duration.hours(1)), + CacheControl.maxAge(cdk.Duration.days(1)), ], }); @@ -72,11 +72,11 @@ export class AppStack extends cdk.Stack { }), ], exclude: ["*"], - include: pagePaths, + include: [...pagePaths, "*.html"], memoryLimit: 512, cacheControl: [ - CacheControl.setPublic(), - CacheControl.maxAge(cdk.Duration.hours(1)), + CacheControl.noCache(), + CacheControl.maxAge(cdk.Duration.millis(0)), ], contentType: "text/html", });