Enable CORS header for Git repo HTTPS access (BB-10018)

Issue #8846 closed
Maksim Lin
created an issue

Would it be possible to add CORS header to the HTTP access to git repos?

This would allow browser based apps using JS git clients to be able to push/pull using smart-http protocol. The only workaround currently is to deploy webapps as Chrome Apps (eg. Tailor, Git-Browser) or FirefoxOS Apps which gives the ability to white-list domains allowed to x-domain access.

This would also depend on https://bitbucket.org/site/master/issue/6666/detect-git-requests-by-content-type-header being fixed first of course.

Comments (6)

  1. Tim Caswell

    How is this going? I've been using github's REST api to work with git from a browser, but it's buggy and works very different.

    If you enabled CORS, I would make it a priority to enable XHR based git operations in js-git so people could make all sorts of useful apps and dev tools as normal webpages. Right now I'm limited to chrome apps, firefox apps, cordova, etc..

  2. Maksim Lin reporter

    Like as @Tim Caswell mentioned, I would also make it a priority to build out the support in the git-html5 library and my app (sj-tig) which is currently restricted to being a packaged chrome app primarily because of the lack of CORS support here (or on github).

    If BB supported CORS, I'd be promoting BB as the preferred git provider in my app.

  3. Log in to comment