Hello, I am new to using Netlify, and I was wondering how I could handle this cors error,
“Access to XMLHttpRequest at ‘https://thingproxy.freeboard.io/fetch/http://api.yelp.com/v3/events?location=EastVillage,NewYork,NY&limit=20&end_date=1565817637&sort_on=time_start&start_date=1565731237’ from origin ‘https://priceless-curie-63955d.netlify.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”
On my local folder, I had a similar error when I used just index.html, but after adding in express and an app.js, and visiting my site through localhost:3000, I didn’t have that error anymore. So I was wondering, since Netlify does static hosting, this might be part of the reason is not working?
I’ve added netlify.toml in my root directory with these settings,
from = “/*”
to = “/index.html”
status = 200
for = “/"
Access-Control-Allow-Origin = "”
_headers file content:
Event with both netlify.toml, and the _headers file I am still getting this error, so I am at a lost as what to do