Edge Functions - UserAgent / Device

Trying to ultimately get the device type within an edge function. Have tried:

request.headers[‘user-agent’] // returns undefined
navigator.userAgent // returns Deno/1.22.1

Have also checked the context object but its not an option currently.

Anything else we can try? Thanks

This allows access to UA:

let requestHeaders = Object.fromEntries(request.headers)
console.log(requestHeaders[“user-agent”])