Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

device routing/mobile deep link middleware #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

barnese3
Copy link
Contributor

@barnese3 barnese3 commented Jan 26, 2019

Middleware: Uses https://github.com/faisalman/ua-parser-js to parse the user-agent header from requests. Then, checks the user's device and operating system. Then, adds Fly-Device-Type and Fly-Device-OS headers to the request.

  • If mobile && iOS, response will be an App Store app page
  • If mobile && Android, response will be a Play Store app page
  • If user is not on a mobile device, the original response will be served (desktop version of site)

Also, had to add queryStringParameters to src/proxy.ts and src/backends/origin.ts for the query string parameters on mobile && Android's origin URL to pass through in the request

-- Deployed at https://mobile-deep-link.edgeapp.net/

( fixes #5 )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device detection
1 participant