Astro build toml CORS error

I’m trying to fix an CORS issue with netlify, I have a site build using and I have an API when I try to access to API from another site, I get the cors error.

You need to return CORS headers from the API and not netlify.toml: