Skip to content

Commit

Permalink
feat: add 'rsc', 'next-router-prefetch', 'next-router-state-tree' to …
Browse files Browse the repository at this point in the history
…lambda cache policy (#107)
  • Loading branch information
bestickley authored Jun 1, 2023
1 parent bd8ff33 commit ee98a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NextjsDistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class NextjsDistribution extends Construct {
*/
public static lambdaCachePolicyProps: cloudfront.CachePolicyProps = {
queryStringBehavior: cloudfront.CacheQueryStringBehavior.all(),
headerBehavior: cloudfront.CacheHeaderBehavior.none(),
headerBehavior: cloudfront.CacheHeaderBehavior.allowList('rsc', 'next-router-prefetch', 'next-router-state-tree'),
cookieBehavior: cloudfront.CacheCookieBehavior.all(),
defaultTtl: Duration.seconds(0),
maxTtl: Duration.days(365),
Expand Down

0 comments on commit ee98a15

Please sign in to comment.