Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When deploying the Distribution the CachePolicy creation returns 400 Bad request #189

Closed
AlbertSabate opened this issue Dec 19, 2023 · 1 comment · Fixed by #188
Closed

Comments

@AlbertSabate
Copy link
Contributor

When deploying the Distribution, the CachePolicy creation returns 400 Bad request. As a result deploying a next app with all defaults will not work.

A way to fix it will be to use override:

overrides: {
      nextjsDistribution: {
        imageResponseHeadersPolicyProps: {},
        serverCachePolicyProps: {
          headerBehavior: CacheHeaderBehavior.allowList(
            'accept',
            'rsc',
            'next-router-prefetch',
            'next-router-state-tree',
            'next-url',
            'x-prerender-revalidate',
          ),
        },
      },
    },

There is a conflict between accept-encoding and enableAcceptEncodingGzip: true. Being set both at the same time.

@AlbertSabate
Copy link
Contributor Author

PR: #188

Fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant