At the moment, serving static SPA React app with react router via CDN works as long as the user reaches the app through the root url.
If the user reloads a certain current URL, however, it will display a 404. To fix this we can add a request url re-write such that
/some/path/
would be replaced by
/
However adding all those edpoints one by one is impossible, especially if there are url parameters used by that app.
Vercel allows this, for example, by specifying rewrites with wildcards
{
"rewrites": [
{"source": "/(.*)", "destination": "/"}
]
}
This is not possible in DO, prevents us from using App platform to serve our frontend app via CDN