Skip to content
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

Closed
wants to merge 19 commits into from
Closed

Conversation

chmac
Copy link
Contributor

@chmac chmac commented Aug 28, 2020

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 to package.json and CHANGELOG.md which you may or may not want to include.

Copy link
Owner

@gabrielcsapo gabrielcsapo left a 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?

@chmac
Copy link
Contributor Author

chmac commented Jan 28, 2021

@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).

@willstott101
Copy link
Contributor

An open-source middleware express-git-server or the like would probably be more worthwhile than docs about express in this repo to be honest.


# 0.6.2 (08/27/2020)

- Adds `repoTemplatePath` option
Copy link
Owner

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",
Copy link
Owner

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",
Copy link
Owner

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

@gabrielcsapo
Copy link
Owner

@chmac I think an easy test would be enable CORS and ensure the headers are set.

@chmac
Copy link
Contributor Author

chmac commented Apr 26, 2021

@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.

@chmac chmac closed this Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants