Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MuthuChess opened this issue Aug 7, 2020 · 3 comments
Labels
Status: Blocked Some technical or requirement is blocking the issue
Projects

Comments

@MuthuChess
Copy link

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.
image

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.

@ghost ghost added this to Inbox in JS Aug 7, 2020
@gr2m gr2m added the Status: Blocked Some technical or requirement is blocking the issue label Aug 7, 2020
@ghost ghost moved this from Inbox to Blocked (by GitHub APIs) in JS Aug 7, 2020
@gr2m
Copy link
Contributor

gr2m commented Aug 7, 2020

We are aware of the problem, there is unfortunately nothing we can do about it.

If think your issue is the same as https://github.com/octokit/rest.js/issues/758, would you mind watching that one? I'll comment there as soon as there are any changes about CORS settings.

I'm also maintaining https://github.com/gr2m/github-api-wishlist/tree/master/wishlist/cors-for-adjacent-domains as an effort to provide the best context information possible to the engineers working on the GitHub API

@gr2m gr2m closed this as completed Aug 7, 2020
JS automation moved this from Blocked (by GitHub APIs) to Done Aug 7, 2020
@vasilvestre
Copy link

There's still no way to download a tarball or release content from octokit ?

@gr2m
Copy link
Contributor

gr2m commented May 21, 2023

Unfortunately, no.

@gr2m gr2m reopened this May 21, 2023
@gr2m gr2m closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Blocked Some technical or requirement is blocking the issue
Projects
Status: 🆕 Triage
JS
  
Done
Development

No branches or pull requests

3 participants