CORS error when calling netlify function on redirected site

You can try defining the following headers on your request if you’re not doing it already:

'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Content-Type',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE'