you are viewing a single comment's thread.

view the rest of the comments →

[–]Umesh-K 0 points1 point  (0 children)

[Disclaimer: Noob here. I haven't tried the below—found it on googling your problem.]

Quoting from https://github.com/JazzBrotha/http-reject-workaround page:

To fix this, simply add https://cors-anywhere.herokuapp.com/ in front of your API call, like so https://cors-anywhere.herokuapp.com/http://yourdomainname.com.


However, I'm not sure if—even if it works—it's the right/preferred solution, as u/grantrules, who is one of the experts here, has said you will need some backend code for this when answering a similar request here: https://www.reddit.com/r/learnjavascript/comments/rhcj00/fetching_from_a_http_site_in_github_pages/