I just deployed my APP in netlify and it was working fine in development, I'm using netlify functions with faunadb, and when I run locally it all works. To make it work in production I just updated the API endpoint. To run locally I was using "http://localhost:8888/api/", and in production I changed to the URL provided by netlify. In production the App doesn't work, I get a CORS error like the image below, it occurs at the login section, when authenticating the user.
I've already tried adding the headers configuration in the response of netlify function (image) and in netlify.toml file, but didn't work either. How can I configure this properly?
Axios instance with the URL (netlify URL + "/api/", as my /.netlify/functions/:splat in netlify.toml):
Function that calls netlify function: