-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add enableCors option #75
Conversation
This passes the `--template=...` flag to the `git init` command. This allows config values and other defaults to be overwritten for newly created repositories.
This should allow me to publish it as a "scoped" package.
Missed publishing this and there's no way to update npm registry unfortunately...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a test for this as well?
@gabrielcsapo Finally getting back to you on these change requests. What would adding a test for this look like? Checking that the CORS headers really are added? Another approach would be to add something to the docs showing how to wrap this package in an express app and adding the cors headers there. That's the approach I've personally taken in one of my apps, as I want to handle some other URLs as well as the git stuff (got the idea in #58). |
An open-source middleware |
|
||
# 0.6.2 (08/27/2020) | ||
|
||
- Adds `repoTemplatePath` option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we combine these changes into 0.6.2 instead of two releases?
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "node-git-server", | |||
"version": "0.6.1", | |||
"name": "@chmac/node-git-server", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change the name of the package back?
"name": "node-git-server", | ||
"version": "0.6.1", | ||
"name": "@chmac/node-git-server", | ||
"version": "0.6.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 0.6.2
@chmac I think an easy test would be enable CORS and ensure the headers are set. |
@gabrielcsapo I'm gonna close this. My fork has subsequently diverged further and it's gonna take quite a bit of effort to extract the changes back here, which is not something I have available time for at the moment. If somebody else wants to pick up on this PR / change, happy to support if I can, the code is all available on my fork. |
This is a naive approach to #53, but it seems to work for me.
I've published my fork including this and the other PRs that I've submitted as
@chmac/node-git-server
if you want to test that. I cherry picked the relevant commits into a separate branch to create a PR without the changes topackage.json
andCHANGELOG.md
which you may or may not want to include.