Access to XMLHttpRequest at 'https://sheet.best/api/sheets/' from origin 'https://xxxx.netlify.com' has been blocked by CORS policy: Request header field x-api-key is not allowed by Access-Control-Allow-Headers in preflight response.
This is the error I get in my browser. How do I add
x-api-key to the
I have tried using both
netlify.toml but none worked for me.
#/public/_header /* Access-Control-Allow-Origin: * Access-Control-Allow-Headers = "x-api-key"
//netlify.toml [[headers]] for = "/*" [headers.values] Access-Control-Allow-Origin = "*" Access-Control-Allow-Headers = "x-api-key"