AWS Amplify doesn't forward headers

1k Views Asked by At

I did deploy a nextjs application on aws amplify, everything is working well.

Now I wanted to use the accept-language header in my application, which does work when I call the cloudfront distribution domain(d2a2qapzh.cloudfront.net), but when I call the main link in amplify(https://main.d2u3plsd0.amplifyapp.com/), the accept-language header doesn't get forwarded.

Any ideas?

1

There are 1 best solutions below

0
On

Amplify uses Cloudfront in background. Cloudfront plays with your headers for few reasons related to caching.

You can refer that list of headers here

I had created an issue with Amplify for similar case with ACCEPT, CONTENT_TYPE, HTTP_ACCEPT. Its still in their feature requests.