Title: Feature: JSS as a CORS proxy for git remotes (with optional paid access via HTTP 402) · Issue #377 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Feature: JSS as a CORS proxy for git remotes (with optional paid access via HTTP 402) · Issue #377 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Feature: JSS as a CORS proxy for git remotes (with optional paid access via HTTP 402) · Issue #377 · JavaScriptSolidServer/JavaScriptSolidServer
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...
Open Graph 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-s...
X 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-s...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/377
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature: JSS as a CORS proxy for git remotes (with optional paid access via HTTP 402)","articleBody":"## Background\n\nJSS 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.).\n\n## Why\n\nBrowser-side git clients (e.g., [JSS Git](https://github.com/JavaScriptSolidServer/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.\n\nA JSS-native proxy would let pod operators:\n- Self-host the bridge (no third-party trust)\n- Optionally monetize the proxy via per-request HTTP 402 pricing\n- Stay within the Solid + Lightning stack already shipping in JSS\n\n## Proposed feature\n\nNew flag `--git-proxy` enables a proxy endpoint that:\n\n1. Accepts requests at `/git-proxy/\u003cremote-url-or-path>/info/refs?...`\n2. Forwards the request to the remote git host with appropriate headers (`Git-Protocol`, `Authorization` if provided)\n3. Returns the response with CORS headers attached (`Access-Control-Allow-Origin`, `Access-Control-Allow-Headers: Git-Protocol, Content-Type`, etc.)\n4. Handles binary responses (pack files) correctly\n5. Optionally pricing-gated via HTTP 402 (`--pay` integration: each proxy request debits the caller's balance per `--pay-cost`)\n\n## URL scheme options\n\n| Option | Example |\n|---|---|\n| A. Path-encoded | `/git-proxy/https%3A%2F%2Fgithub.com%2Fuser%2Frepo.git/info/refs` |\n| B. Subpath mirror | `/git-proxy/github.com/user/repo.git/info/refs` |\n| C. Query param | `/git-proxy/info/refs?upstream=https://github.com/user/repo.git` |\n\nRecommend B for cleaner URLs and easier client handling.\n\n## Composing with `--pay`\n\nPricing tiers (configurable):\n- Free up to N requests/hour per WebID (rate-limited)\n- Paid above that: deduct `--pay-cost` per request from caller's ledger balance\n- HTTP 402 returned when balance insufficient\n- Bandwidth-priced option (`--pay-per-byte`) for large clones\n\n## Marketing story\n\n> *\"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.\"*\n\nPulls together: Solid + git smart-HTTP + Lightning + browser-side cloning. A complete decentralized git-hosting story.\n\n## Refs\n\n- `src/handlers/git.js` — existing git handler\n- `src/handlers/pay.js` — existing payment + ledger\n- `src/wac/checker.js` — WAC payment conditions\n- JSS Git frontend: github.com/JavaScriptSolidServer/git\n- isomorphic-git CORS proxy spec: https://isomorphic-git.org/docs/en/cors","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-08T05:41:35Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/377"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c907b9d2-9ff8-d844-fb3f-7d2e69905a55 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B784:3CC073:2BF5CAE:3A0B686:6B0398D7 |
| html-safe-nonce | 0e645750332e254bbe758759ef57ed2070c75ba0e152a048c2b18618d330e26a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzg0OjNDQzA3MzoyQkY1Q0FFOjNBMEI2ODY6NkIwMzk4RDciLCJ2aXNpdG9yX2lkIjoiMTIyNTUwMDg4NzQyNzAyOTIwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c74886d497ba1f7fcee0af33553b914beaa467c9d1cfed0fe814cbda97073e4a |
| hovercard-subject-tag | issue:4404062333 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/377/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e0da65b692ff11070acad0f9ef83bfd0d933c2512539bc8eadceeb3215445058/JavaScriptSolidServer/JavaScriptSolidServer/issues/377 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e0da65b692ff11070acad0f9ef83bfd0d933c2512539bc8eadceeb3215445058/JavaScriptSolidServer/JavaScriptSolidServer/issues/377 |
| og:image:alt | 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-s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width