DEV Community

Discussion on: CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Collapse
 
ben profile image
Ben Halpern

I guess you're running this in the browser if you're getting this error.

Is this an endpoint which requires an API key? If that is the case I wouldn't be surprised if GitHub proactively restricts this because that wouldn't be advised.

Either way, you may need to run this on the server and then pass it along to the browser? Just a thought. There could be something else going on.

Collapse
 
maluzzz profile image
MariLuz • Edited

Exactly, I run in the browser and my app requires API key to communicate with GitHub.
I don't use server-side so I was looking for a proxy solution or something like that.
But sometimes it is working fine and sometimes stops working, and I can't figure why

Thanks for your answer :D