Redirect proxy to read from api

So I have a hosted React app

I want to make redirects that go to my API backend endpoints

when the Netlify URL goes to
it should redirect and request my API which is hosted on

I have created a netlify.toml files below

from = “/*”
to= “/index.html”
status = 200

from =“*”
to = “
status = 200
force = true
headers = {“Content-type” = “application/json”, “Access-Control-Allow-Origin” = “”}

but the redirect is not happening kindly assist solve this problem

@Ngo-connect See the documentation for Rule processing order

The redirects engine will process the first matching rule it finds, reading from top to bottom. Rules in the _redirects file are always processed first, followed by rules in the Netlify configuration file.

Your second redirect won’t take effect because the less specific one is a higher priority.