Skip to content

Commit

Permalink
fix: 400 Bad request when creating CachePolicy on the Distribution. (#…
Browse files Browse the repository at this point in the history
…188)

AllowList accept-encoding headerBehaviour is not compatible with enableAcceptEncodingGzip: true.

My recommendation is to remove accept-encoding from allowList headerBehaviour as default. And the final user can amend as they wish. But like this, the default options will be functional.
  • Loading branch information
AlbertSabate authored Dec 19, 2023
1 parent a874b09 commit c4c8159
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/NextjsDistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ export class NextjsDistribution extends Construct {
queryStringBehavior: cloudfront.CacheQueryStringBehavior.all(),
headerBehavior: cloudfront.CacheHeaderBehavior.allowList(
'accept',
'accept-encoding',
'rsc',
'next-router-prefetch',
'next-router-state-tree',
Expand Down

0 comments on commit c4c8159

Please sign in to comment.