I’m aware that this topic might be a duplicate, so sorry about that.
That’s my 2nd day searching for a way to fix the famous and very annoying CORS issue. I’ve already tried solutions from this forum, without success (which is why I’m creating this new post).
Here is my github repo: GitHub - pyGab86/ovReact
Here is the deployed site: https://heuristic-beaver-8cd8e4.netlify.app
And here is the error I get if I enter TSLA into the input (the app is making a get request to https://cdn.cboe.com/api/global/delayed_quotes/options/TSLA.json) :
Access to XMLHttpRequest at above url from origin ‘https://heuristic-beaver-8cd8e4.netlify.app’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
I managed to handle this CORS issue on my local environment with a setupProxy.js file or by using a prefixed url as a proxy BUT, none of these options are working on my deployed site.
I have also tried using a netlify.toml file with this line inside: /cdn/* https://cdn.cboe.com/:splat 200
, that I placed inside the build folder (I use the build folder to deploy my site), but still have this issue.
I have no clue of how to set/where to place this netlify.toml file to create the proxy that would save my entire life.
A solution would be very very welcome
I guess for now I’ll just turn off my computer, go outside and have a beer…