GitHub connector: gateway drops `Location` on 302 responses, making archive endpoints unusable
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从文档中的 gateway URL 开始,使用 /tarball 或 /zipball endpoint 重现 302,然后将其与正常工作的 /contents/Gemfile 请求进行比较。payload 没有列出源文件或测试,因此请定位处理 provider response headers 的 gateway 实现。完成标准是 GitHub 的 Location 能传递到客户端,使 curl -L 可以获取 archive。
由索引模型根据 Issue 内容生成。
描述
Summary
Requests proxied through a GitHub connector lose the Location header on 302 responses. GitHub's repository-archive endpoints (/tarball, /zipball) always redirect to codeload.github.com, so through the gateway they return a bodyless 302 with nothing to follow, and the archive can never be retrieved.
Reproduction
From inside a Sprite authorised for a GitHub connector whose access policy allows the path:
curl -sS -D - -o /dev/null \
"https://api.sprites.dev/v1/gateway/github/<conn_id>/repos/<owner>/<repo>/tarball/<ref>"
Response headers:
HTTP/2 302
date: Wed, 19 Aug 2026 07:18:02 GMT
content-length: 0
vary: accept-encoding
cache-control: max-age=0, private, must-revalidate
x-ratelimit-remaining: 4860
content-type: text/html;charset=utf-8; charset=utf-8
server: Fly/d778e1ff4 (2026-08-17)
via: 2 fly.io
fly-request-id: 01M0CE4P4JB2SPJ4T4V6BVHHR7-sin
There is no Location. curl -L consequently follows nothing and writes a zero-byte file, exiting 0.
The same connector against a non-redirecting endpoint works as expected:
curl -sS "https://api.sprites.dev/v1/gateway/github/<conn_id>/repos/<owner>/<repo>/contents/Gemfile"
{"name":"Gemfile","path":"Gemfile","sha":"...","size":3571, ...}
Expected
GitHub's Location (a pre-signed codeload.github.com URL) is passed through so clients can follow the redirect.
Impact
/tarball, /zipball and any other redirecting GitHub endpoint are unreachable through a connector. A connector is not a git transport either, so there is currently no way to get a private repository's source into a Sprite using one. The only redirect-free alternative is fetching blobs individually through /contents, which for a ~3,900-file repository is close to the entire hourly rate limit for a single clone.
Possibly related
Accept: application/vnd.github.raw on a /contents/ request through the gateway returns 406 Not Acceptable. The identical request without that header succeeds and returns JSON, which suggests request headers are not forwarded to the provider.
Environment
sprite CLI 2026-08-14, default base image (Ubuntu 26.04), OAuth GitHub connector with repo scope.
- 主要语言
- MDX
- 星标
- 53
- 派生
- 5
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 4
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
superfly/sprites-docs 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
superfly/sprites-docs#226 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100
superfly/sprites-docs#220 ·
维护者通常 1 天内回复
-
Add S3 Object Store, Anthropic, and Discourse to the connectors Providers table可能重新可做 @kcmartin 于 85 天前认领,目前没有进行中的 PR。 未关闭
superfly/sprites-docs#237 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
superfly/sprites-docs#231 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
superfly/sprites-docs#230 · 2 条评论 ·
维护者通常 1 天内回复
查看 superfly/sprites-docs 的全部 Issue
相似的 Issue
-
v3
难度 2/5 1-3 小时 新手友好度 88/100
pluginkollektiv/antispam-bee#952 ·
维护者通常 1 天内回复
-
area: middleware enhancement good first issue
难度 2/5 1-3 小时 新手友好度 68/100
-
config: reject Proxy-Authorization and Proxy-Authenticate in server headers可能已有人在做 @haseemajaz 今天认领。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 88/100
rohitgollarahalli/mcpx#38 · 1 条评论 ·
维护者通常 1 天内回复
-
area: API good first issue size/xs
难度 2/5 1-3 小时 新手友好度 92/100
DahanItamar/DockNest#354 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100