2 Answers
Why not option C? using [email protected] for authorization would be a better choice. I am just going by elimination method
One way of increasing cache hit is to reduce the headers and query parameters used in the cache lookup. The doc is at https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cache-hit-ratio.html.
It looks like the question is getting at which headers must be passed to the application and which ones can be removed.
A – Breaking up the origin to static and dynamic would help. The application needs session and authorization headers, and neither need the user agent or host.
B – The application requires the authorization header
C – The application requires the session header
D – Almost the same as A except the host header is kept, meaning that it will affect the cache hit.
The question has two parts, increase cache hit ratio, and don’t break SSL between CloudFront and the ALB. The second part seems extra, I didn’t see anything in the answer list that would break it.
So, long story, but A will do the best at increasing the cache hit ratio.
Also worth having a look at https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-https-connection-fails/ which talks about "If you’re whitelisting the host header on your CloudFront distribution, verify that the Application Load Balancer has a TLS certificate configured with the same name. Otherwise, the Application Load Balancer offers its default certificate, which might not match the SNI associated with the ClientHello message from CloudFront."
But in the question "A valid ACM certificate is applied to the CloudFront distribution with a matching CNAME in the distribution settings. The ACM certificate is also applied to the HTTPS listener for the Application Load Balancer" so host header in not required
not sure,