A set of useful libraries for Edge Apps. Run locally, write tests, and integrate it into your deployment process. Move fast and maybe don't break things? Because, gosh darnit, you're an adult.
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
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, addsFly-Device-Type
andFly-Device-OS
headers to the request.Also, had to add
queryStringParameters
tosrc/proxy.ts
andsrc/backends/origin.ts
for the query string parameters onmobile && Android
's origin URL to pass through in the request-- Deployed at https://mobile-deep-link.edgeapp.net/
( fixes #5 )