Search code examples
reactjsgithubgithub-pages

How can I send requests from GitHub Pages without running into CORS?


So I tried to host a little project I made in React.

GitHub GitHub Pages

But, everytime I try to send a request to MetaWeather, I get this back. Error

I don't know what I should be doing different. I used Axios, but even with Fetch the same thing happens.


Solution

  • You can use https://cors-anywhere.herokuapp.com/ but remember it should be enabled from there side also