edge icon indicating copy to clipboard operation
edge copied to clipboard

device routing/mobile deep link middleware

Open barnese3 opened this issue 6 years ago • 0 comments

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 )

barnese3 avatar Jan 26 '19 00:01 barnese3