SOA-C02 · Question #57
A company is running a website on Amazon EC2 instances behind an Application Load Balancer (ALB). The company configured an Amazon CloudFront distribution and set the ALB as the origin. The company…
The correct answer is A. Configure the CloudFront distribution behavior to forward the User-Agent header. If you want CloudFront to cache different versions of your objects based on the device that a user is using to view your content, we recommend that you configure CloudFront to forward one or more of the following headers to your custom origin: CloudFront-Is-Desktop-Viewer…
Question
A company is running a website on Amazon EC2 instances behind an Application Load Balancer (ALB). The company configured an Amazon CloudFront distribution and set the ALB as the origin. The company created an Amazon Route 53 CNAME record to send all traffic through the CloudFront distribution. As an unintended side effect, mobile users are now being served the desktop version of the website. Which action should a SysOps administrator take to resolve this issue?
Options
- AConfigure the CloudFront distribution behavior to forward the User-Agent header.
- BConfigure the CloudFront distribution origin settings.
- CEnable IPv6 on the ALB.
- DEnable IPv6 on the CloudFront distribution.
How the community answered
(45 responses)- A71% (32)
- B4% (2)
- C18% (8)
- D7% (3)
Explanation
If you want CloudFront to cache different versions of your objects based on the device that a user is using to view your content, we recommend that you configure CloudFront to forward one or more of the following headers to your custom origin: CloudFront-Is-Desktop-Viewer CloudFront-Is-Mobile-Viewer CloudFront-Is-SmartTV-Viewer CloudFront-Is-Tablet-Viewer As you can see based on what comes in the request received by CF, It is going to set the value to true before forwarding the request to your origin. The resume, with origin custom headers you are the one that decide what is going to be on the header, there is no way to match what it comes on the request received on CF and what is going to be sent to the origin. On the other hand with User-Agent header, CF inspects the header and determines what type of device is used (Smart TV, Tablet, Desktop, Mobile).
Topics
Community Discussion
No community discussion yet for this question.