xxxxxxxxxx
I maybe late but here how it is done. Netlify should have special file in your root directory called __redirect and you can define your proxy there like
/api/* https://yourapi.domain.com/:splat 200
/* /index.html 200
Then you can call your api like this
const res = fetch('/api/user') //equivalent to https://yourapi.domain.com/user
Hope this helped