Open nicholaschiang opened 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).
We're using AWS to host our static
build/
assets (see #255):build/
dir*.tutorbook.app
) that point to that CloudFront distributionCloudFront only supports one default root object (
index.html
) but that root object doesn't apply to sub-directories (e.g.app/index.html
orlegal/index.html
). I've added an AWS lambda@edge function to support thoseapp/
andlegal/
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
andtutorbook.app/legal#terms
should work).