Proxy Redirect with CORS issue, site not working?

SPAs deployed to Netlify need a special redirect as mentioned in the History pushstate and single-page apps documentation.

Better to have a specific rewrite for the backend for example

[[redirects]]
  from = "/api/*"
  to = "https://api.somewhere.com/v1/:splat"
  status = 200

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

where all requests to the /api path are routed to the backend. You can read a more detailed post here.