Rewrites/Redirects for AWS Amplify

Viewed 467

Can anyone help me with setting up rewrites/redirects?

I have a route that is /privacy_policy

With no rewrite, I get access denied only on the hosted app.

Then I found this solution for it: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html#redirects-for-single-page-web-apps-spa

Added this to Amplify settings, and the page works fine. However, I have custom fonts in the directory that weren't loading in production.

I followed this: React images load locally but not on AWS Amplify

And changed the redirect from 200 to 404 rewrite. However, this then broke my fb login because fb curls my privacy policy and it returned a 404. How can I get both to work?

0 Answers
Related