Repository navigation
Description
Background
JSS already exposes git smart-HTTP via --git and supports HTTP 402 paid access via --pay. Combining these would let a JSS pod act as a CORS-enabled, optionally-paid gateway for browser-side git clients to any remote git server (GitHub, GitLab, Gitea, other JSS pods, etc.).
Why
Browser-side git clients (e.g., JSS Git, built on isomorphic-git) hit CORS preflight failures against major git hosts that don't return browser-friendly headers. Public CORS proxies (cors.isomorphic-git.org) exist but introduce third-party dependencies, privacy concerns, and uptime risk.
A JSS-native proxy would let pod operators:
- Self-host the bridge (no third-party trust)
- Optionally monetize the proxy via per-request HTTP 402 pricing
- Stay within the Solid + Lightning stack already shipping in JSS
Proposed feature
New flag --git-proxy enables a proxy endpoint that:
- Accepts requests at
/git-proxy/<remote-url-or-path>/info/refs?... - Forwards the request to the remote git host with appropriate headers (
Git-Protocol,Authorizationif provided) - Returns the response with CORS headers attached (
Access-Control-Allow-Origin,Access-Control-Allow-Headers: Git-Protocol, Content-Type, etc.) - Handles binary responses (pack files) correctly
- Optionally pricing-gated via HTTP 402 (
--payintegration: each proxy request debits the caller's balance per--pay-cost)
URL scheme options
| Option | Example |
|---|---|
| A. Path-encoded | /git-proxy/https%3A%2F%2Fgithub.com%2Fuser%2Frepo.git/info/refs |
| B. Subpath mirror | /git-proxy/github.com/user/repo.git/info/refs |
| C. Query param | /git-proxy/info/refs?upstream=https://github.com/user/repo.git |
Recommend B for cleaner URLs and easier client handling.
Composing with --pay
Pricing tiers (configurable):
- Free up to N requests/hour per WebID (rate-limited)
- Paid above that: deduct
--pay-costper request from caller's ledger balance - HTTP 402 returned when balance insufficient
- Bandwidth-priced option (
--pay-per-byte) for large clones
Marketing story
"JSS Git browses any git repo — your pod, GitHub, Gitea, anywhere — by routing through a pod-hosted proxy. Free for friends; sat-per-request for strangers."
Pulls together: Solid + git smart-HTTP + Lightning + browser-side cloning. A complete decentralized git-hosting story.
Refs
src/handlers/git.js— existing git handlersrc/handlers/pay.js— existing payment + ledgersrc/wac/checker.js— WAC payment conditions- JSS Git frontend: github.com/JavaScriptSolidServer/git
- isomorphic-git CORS proxy spec: https://isomorphic-git.org/docs/en/cors
Activity
melvincarvalho commentedon May 8, 2026
Closing in favor of #378, which generalizes this from git-specific to a WAC-gated CORS proxy for any upstream. The git use case becomes a special case of the general feature:
/proxy/<git-host-url>/info/refsrather than/git-proxy/.... Same SSRF/auth machinery covers everything; the marketing story ("JSS Git browses any repo through a self-hosted proxy") still works, just rephrased to "JSS Git browses any repo through your pod's CORS proxy."cors-proxy: Phase 1 — WAC-gated proxy for browser apps (#378) (#379)