fix : page files cache control

This commit is contained in:
GuillaumeSD
2025-05-17 17:28:29 +02:00
parent 419f82e849
commit ae0b2735e4

View File

@@ -56,11 +56,11 @@ export class AppStack extends cdk.Stack {
exclude: ["engines"], exclude: ["engines"],
}), }),
], ],
exclude: pagePaths, exclude: [...pagePaths, "*.html"],
memoryLimit: 512, memoryLimit: 512,
cacheControl: [ cacheControl: [
CacheControl.setPublic(), 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: ["*"], exclude: ["*"],
include: pagePaths, include: [...pagePaths, "*.html"],
memoryLimit: 512, memoryLimit: 512,
cacheControl: [ cacheControl: [
CacheControl.setPublic(), CacheControl.noCache(),
CacheControl.maxAge(cdk.Duration.hours(1)), CacheControl.maxAge(cdk.Duration.millis(0)),
], ],
contentType: "text/html", contentType: "text/html",
}); });