fix(iron-proxy): allow content-encoding header so private git clone works#403
Open
pkobielak wants to merge 1 commit into
Open
fix(iron-proxy): allow content-encoding header so private git clone works#403pkobielak wants to merge 1 commit into
pkobielak wants to merge 1 commit into
Conversation
…orks iron-proxy's strict outbound header_allowlist omitted content-encoding, so the gzip-compressed git-upload-pack POST body was forwarded while the Content-Encoding: gzip header was stripped. GitHub then parsed the gzip bytes as plaintext and returned HTTP 400, breaking private git clone/fetch/ pull over HTTPS from sandboxes (gh api and public clones were unaffected). Add content-encoding to the header_allowlist in both the authoritative base config and the standalone egress proxy copy. Fixes paradigmxyz#402
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
iron-proxy's strict outbound
header_allowlistomittedcontent-encoding, so the gzip-compressedgit-upload-packPOST body was forwarded while theContent-Encoding: gzipheader was stripped. GitHub then parsed the gzip bytes as plaintext and returned HTTP 400, breaking privategit clone/fetch/pullover HTTPS from sandboxes.gh apiand public clones were unaffected.This adds
content-encodingto theheader_allowlistin both configs that carry the allowlist:services/api/api/iron-proxy.base.yaml(authoritative — baked into thecentaur-apiimage and used to render every per-sandbox proxy config)services/iron-proxy/iron-proxy.yaml(standalone egress proxy copy)Fixes #402
Testing
Verified locally on kind:
content-encodingto both files, rebuiltcentaur-api, redeployed, and forced a rollout.gh api user→200git clone https://github.com/<org>/<private-repo>→ succeeds (exit 0)git-upload-packPOST now returns200(was400) andContent-Encodingis no longer instripped_headers.No test changes required —
services/api/tests/test_proxy_config.pyasserts transform names only.