I have deployed my React app to the DigitalOcean App Platform. The app uses client-side routing (e.g., React Router). The home page works correctly when visiting the root URL, but when I try to navigate directly to other routes by entering the URL (e.g., /auth/login), I get a 404 error (The requested page was not found). However, navigating within the app to that URL works as expected.
I have tried configuring catch-all routing using custom pages in the DigitalOcean dashboard, but it doesn't seem to work as intended.
How can I properly configure my React app on the DigitalOcean App Platform to handle client-side routing and serve the index.html file for all routes?
Additional context:
My React app is built using Vite. I am using React Router Dom for client-side routing. My app is deployed on the DigitalOcean App Platform using the default settings.