AWS CloudFront 如何检测移动设备

How Does AWS CloudFront Detect Mobile Devices

A​​WS CloudFront 可以根据 User-Agent header:

的值检测设备类型

If you want CloudFront to cache different versions of your objects based on the device a user is using to view your content, configure CloudFront to forward the applicable headers to your custom origin:

  • CloudFront-Is-Desktop-Viewer
  • CloudFront-Is-Mobile-Viewer
  • CloudFront-Is-SmartTV-Viewer
  • CloudFront-Is-Tablet-Viewer

Based on the value of the User-Agent header, CloudFront sets the value of these headers to true or false before forwarding the request to your origin. If a device falls into more than one category, more than one value might be true. For example, for some tablet devices, CloudFront might set both CloudFront-Is-Mobile-Viewer and CloudFront-Is-Tablet-Viewer to true.

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device

我想知道 AWS 是否发布了用于检测移动浏览器的用户代理列表。

文档中提到了"If a device falls into more than one category",所以我需要知道它是如何确定这些类别的。

AWS 使用基于用户代理检测设备,但不提供任何详细信息。

可以找到用户代理列表 here