I was looking to use git as a storage backend for a project I was working on, as one can run git in the browser now using isomorphic git. The app needed to run from my machine directly for easier development, which meant that the remote git backend has to support CORS. Luckily the gitea project allows one to quite easily host your own git reposities with an interface very similar to github.
The following 3 extra options was need in the app.ini file for CORS to ne working:
[repository] ACCESS_CONTROL_ALLOW_ORIGIN = * [cors] ENABLED = true ALLOW_CREDENTIALS = true