Does CF provide user agent parsing for device type for Workers?
From these docs https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties it doens't seem like CF will provide device type info "mobile" "tablet" or "desktop". From https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/ CF does parse this info when you turn on caching. Is it possible to get access through the worker?
Cache by device type · Cloudflare Automatic Platform Optimization d...
APO cache by device type provides all of the same benefits of Cloudflare’s cache while targeting visitors with content appropriate to their device. …
Request · Cloudflare Workers docs
The Request interface represents an HTTP request and is part of the Fetch API.
2 Replies
You could do the regex matching they do yourself?
Yeah, probably will end up doing that are using a 3rd party lib