Title: git handler: allow `git-protocol` header in CORS preflight responses · Issue #371 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: git handler: allow `git-protocol` header in CORS preflight responses · Issue #371 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: git handler: allow `git-protocol` header in CORS preflight responses · Issue #371 · JavaScriptSolidServer/JavaScriptSolidServer
Description: The git handler in src/handlers/git.js doesn't whitelist the git-protocol header in CORS preflight (OPTIONS) responses. This blocks browser-side git clients (e.g., isomorphic-git) from making cross-origin requests when using protocol v2,...
Open Graph Description: The git handler in src/handlers/git.js doesn't whitelist the git-protocol header in CORS preflight (OPTIONS) responses. This blocks browser-side git clients (e.g., isomorphic-git) from making cross...
X Description: The git handler in src/handlers/git.js doesn't whitelist the git-protocol header in CORS preflight (OPTIONS) responses. This blocks browser-side git clients (e.g., isomorphic-git) from making c...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/371
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"git handler: allow `git-protocol` header in CORS preflight responses","articleBody":"The git handler in `src/handlers/git.js` doesn't whitelist the `git-protocol` header in CORS preflight (`OPTIONS`) responses. This blocks browser-side git clients (e.g., isomorphic-git) from making cross-origin requests when using protocol v2, which sends `git-protocol: version=2`.\n\n## Symptom\n\n```\nAccess to fetch at 'https://pod.example/path/repo/info/refs?service=git-upload-pack'\nfrom origin 'https://jss.live' has been blocked by CORS policy:\nRequest header field git-protocol is not allowed by Access-Control-Allow-Headers\nin preflight response.\n```\n\n## Fix\n\nIn the OPTIONS preflight response for git-protocol routes, add `git-protocol` to `Access-Control-Allow-Headers`. Suggested allowed-headers list:\n\n```\nAccess-Control-Allow-Headers: content-type, authorization, git-protocol\n```\n\n## Context\n\nThe browser-side git frontend at `jss.live/git/` (repo: JavaScriptSolidServer/git) currently works around this by setting `protocolVersion: 1` in `git.listServerRefs`. That's a client workaround; the proper fix is server-side so smart-HTTP v2 works for all clients.\n\n## Refs\n\n- `src/handlers/git.js` — git smart-HTTP handler\n- isomorphic-git protocol v2 sends `git-protocol: version=2` header\n- Workaround in jss-git frontend: https://github.com/JavaScriptSolidServer/git/blob/gh-pages/index.html","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-08T01:00:01Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/371"}
| 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:94bb30f4-e4dc-bff5-63cf-65655aaa05e4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9AE2:263885:97C5F3:BFF634:6B039652 |
| html-safe-nonce | 74f865a0ef9c187b8ed8d99dec836b5f7b3d4b83509989d221fd958e3191c12b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUUyOjI2Mzg4NTo5N0M1RjM6QkZGNjM0OjZCMDM5NjUyIiwidmlzaXRvcl9pZCI6Ijg2NjUyNDk1NzY5Mjk5NTc0NTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3effd7d82f43e65a4b9209a46a5c75998c1417a297fdfa5db4a083032f80c6d7 |
| hovercard-subject-tag | issue:4402969295 |
| 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/371/issue_layout |
| twitter:image | https://opengraph.githubassets.com/75542b5806dacf0ce9321cbd9d9509c6ebb900cbd99777a311dd90d899f93b09/JavaScriptSolidServer/JavaScriptSolidServer/issues/371 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/75542b5806dacf0ce9321cbd9d9509c6ebb900cbd99777a311dd90d899f93b09/JavaScriptSolidServer/JavaScriptSolidServer/issues/371 |
| og:image:alt | The git handler in src/handlers/git.js doesn't whitelist the git-protocol header in CORS preflight (OPTIONS) responses. This blocks browser-side git clients (e.g., isomorphic-git) from making cross... |
| 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