I just launched my first working Back4App application. This application is a React app with the React Router. To make it work, I did a npm run build
and uploaded all the files under the 'public' folder (found at Cloud Code).
Now everything is in place, I can go to the index page, that is https://[myapp].b4a.app, and everything works well. But when I go to a subpage and do a refresh, I stumble upon a 403 - {"error":"unauthorized"}
error.
I do understand this happens because the user tries to go where my app is not served. Normally I would put Nginx or something similar in the middle; so I could catch those requests and redirect them to the SPA.
But now, as I don't have control on the backend side at all, how can I make this work?