We use CloudFront for caching user requests on CDN level.
The problem is that we want to pass User-Agent
header to origin to be able to track it but we do not want to use it as caching key(there are just too many User agents and value of caching will be zero).
When using Whitelist
strategy for headers AWS Cloudfront cuts all headers which are not whitelisted and are not default and doesn't send them to origin.
As we use Whitelist
Forward strategy now, one of the solutions will be to switch to All
strategy but we do like other headers that we are using as cache keys.
Any ideas?
I checked similar questions, but found no answer to this question by far:
Pass cookie to CloudFront origin but prevent from caching (similar but for cookies)