blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://render.githubusercontent.com' that is not equal to the supplied origin. #158
Labels
Status: Blocked
Some technical or requirement is blocking the issue
Hi Team,
I'm trying to access github api via browser from my react web based application. I Installed npm octokit/core.
I followed this procedure https://docs.github.com/en/rest/reference/repos#download-a-repository-archive to download the zip artifact from a public repository.
The image shows the request headers which has origin null.
Error: Access to fetch at 'https://codeload.github.com/{owner}/{repo}/legacy.zip/master' (redirected from 'https://api.github.com/repos/{owner}/{repo}/zipball/master') from origin 'http://localhost:3001' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://render.githubusercontent.com' that is not equal to the supplied origin. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Please let me know if you require any details
Regards,
Muthu.
The text was updated successfully, but these errors were encountered: