tutorbookapp / old-tutorbook

Source available code for Tutorbook's progressive web app (PWA).
https://tutorbook.app
Other
13 stars 10 forks source link

fix: polish url beautification #265

Open nicholaschiang opened 4 years ago

nicholaschiang commented 4 years ago

We're using AWS to host our static build/ assets (see #255):

CloudFront only supports one default root object (index.html) but that root object doesn't apply to sub-directories (e.g.app/index.html or legal/index.html). I've added an AWS lambda@edge function to support those app/ and legal/ URLs following this tutorial but it still needs the trailing slash which is a tad bit annoying.

The problem here is to update the given code (from that tutorial) to make our lambda@edge function support queries without the trailing slash (e.g. tutorbook.app/app and tutorbook.app/legal#terms should work).

nicholaschiang commented 4 years ago

Moving this up to Priority 1 because right now user's cannot bookmark certain pages within the app like we used to be able to do when we used Google's Firebase Hosting (because Firebase Hosting would re-write all unknown queries to our index.html which would then redirect them to the correct location within the app using a ?redirect= query parameter).