Skip to content

Commit

Permalink
Do not prune/invalidate old assets
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Mar 22, 2024
1 parent d9aabb2 commit 7958caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdk/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,12 @@ export class Stack extends cdk.Stack {
path.join(distDirname, `static/client`),
),
],
distribution,
distributionPaths: [`/client/*`],
cacheControl: [
cdk.aws_s3_deployment.CacheControl.setPublic(),
cdk.aws_s3_deployment.CacheControl.maxAge(cdk.Duration.days(365)),
cdk.aws_s3_deployment.CacheControl.immutable(),
],
prune: false,
},
);

Expand All @@ -183,6 +182,7 @@ export class Stack extends cdk.Stack {
cdk.aws_s3_deployment.CacheControl.setPublic(),
cdk.aws_s3_deployment.CacheControl.maxAge(cdk.Duration.days(3)),
],
prune: false,
});

new cdk.CfnOutput(this, `function-url-output`, {
Expand Down

0 comments on commit 7958caf

Please sign in to comment.