ZIP files on GitHub cannot be fetched directly from the browser.
This is because CORS headers are not set, so browsers refuse to fetch them.
ZitHub fixes this by serving as a server-side proxy.
Some limitation apply
Only the following URL patterns are supported:
-
From the API:
https://api.github.com/repos/${owner}/${repo}/zipball/${ref}
- From API download:
https://codeload.github.com/${owner}/${repo}/legacy.zip/refs/(heads|tags)/${ref}
https://codeload.github.com/${owner}/${repo}/zip/refs/(heads|tags)/${ref}
-
From a repository release or "Download ZIP" button:
https://github.com/${owner}/${repo}/archive/refs/(heads|tags)/${ref}.zip
-
From a "Raw" link:
https://raw.githubusercontent.com/${owner}/${repo}/refs/(heads|tags)/${ref}/${path}/${file}.zip