estiens / world_cup_json

Rails backend for a scraper that outputs World Cup data as JSON
928 stars 107 forks source link

cors error #197

Closed cyrusDev1 closed 1 year ago

cyrusDev1 commented 1 year ago

Access to XMLHttpRequest at 'https://world-cup-json-2022.fly.dev/matches?start_date=2022-10-16&end_date=2022-10-16' from origin 'https://*****.netlify.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I get this error only on mobile browsers

estiens commented 1 year ago

Are you proxying from a local URL to that one?

cyrusDev1 commented 1 year ago

Are you proxying from a local URL to that one?

No

cyrusDev1 commented 1 year ago

Are you proxying from a local URL to that one?

I solved the problem by creating a proxy to which I send the request. Thank you for this awesome api