I've created a Cloudfront distribution to deliver a couple of pages that may change according to the user language. Both pages are being served from an EC2 instance with an ELB in front of them.
My Cloudfront origin is the ELB and it works as expected regarding its cache default behavior. Although, I need to cache pages according to the user's Accept-Language header. For that, I created a custom header whitelist, where I included the Accept-Language header...but it does not work at all.
I've tried multiple configurations with no success. If I request the page directly through the ELB address it works as expected, but every time I use the CDN address the Accept-Language header gets removed in between. Any idea of what is going on here?
Cloudfront removes that header If You Don't Configure CloudFront to Cache Based on Header Values
How to configure cloudfront to cache based on Header Values
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With