nuxt-modules / nuxt-modules/device

Cloudfront detection shouldn't rely on user-agent

Open
#141 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

pending triage
Dominant language
TypeScript
Stars
1k
Forks
54
PR merge metrics
No merged PRs in 30d

Description

It looks like the code only detects Cloudfront if the user-agent is Amazon Cloudfront. It should instead just detect the 2-3 device headers it uses and just use them if they exist.

We've been using Cloudfront device detection for a while, and our user-agents are whatever the user's browser is, not the value above. The change requested would accommodate a larger audience and configuration setups.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Cloudfront detection entry point and the existing tests for device detection; no file or test path is named in the issue. Confirm which 2-3 Cloudfront device headers are currently used, then verify that detection works with ordinary browser user-agents and when those headers are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.