所有 /api/... 请求会原样转发到 api.github.com,支持 GET / POST / PUT / DELETE 与自定义请求头。
| 场景 | 命令 |
|---|---|
| 获取仓库信息(匿名) | curl https://gh-proxy-page-bz0.pages.dev/api/repos/github/gitignore |
| 带 Token 调用(推荐,避免限速) | curl -H "Authorization: Bearer <TOKEN>" https://gh-proxy-page-bz0.pages.dev/api/user |
| 获取发行版列表 | curl https://gh-proxy-page-bz0.pages.dev/api/repos/<owner>/<repo>/releases |
| 创建 Issue | curl -X POST -H "Authorization: Bearer <TOKEN>" -d '{"title":"hi"}' https://gh-proxy-page-bz0.pages.dev/api/repos/<owner>/<repo>/issues |
| 完整 URL 透传 | curl https://gh-proxy-page-bz0.pages.dev/https://api.github.com/repos/github/gitignore |
前端跨域已开启 CORS,浏览器里直接 fetch 即可。
| 前缀 | 转发到 | 用途 |
|---|---|---|
/api/ | api.github.com | GitHub API 全量 |
/raw/ | raw.githubusercontent.com | 原始文件 |
/gh/ | github.com | 网页 |
/objects/ | objects.githubusercontent.com | Release 大文件 / LFS |
/codeload/ | codeload.github.com | zip / tar 下载 |
/gist/ | gist.githubusercontent.com | Gist 文件 |
/avatars/ | avatars.githubusercontent.com | 头像 |
/uploads/ | uploads.github.com | Gist 上传 |