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

Fixing default cors settings #9

Merged
merged 3 commits into from
Nov 13, 2013

Conversation

runemadsen
Copy link
Collaborator

Here's another small one: The default CORS=true setting is broken. This fixes it, so cors is enabled by default.

@runemadsen
Copy link
Collaborator Author

Actually, without this, the cors setting doesn't work at all. It will always be "undefined" even though you set it in the options. I would love if you could publish this to npm :-)

@runemadsen
Copy link
Collaborator Author

Also, I just added another feature that you might or might not like. Most API's have the ability to send custom headers to the server, and allow these in CORS requests. This pull request adds the ability to add a string of custom headers, either directly to the canned() object, or though the bin arguments. So you can run it like this:

canned --headers "Authorization, Another-Header"

... and these will automatically be added to the allowed CORS headers.

@sideshowcoder
Copy link
Owner

I don't use CORS personally but this looks good. Will merge and publish

sideshowcoder added a commit that referenced this pull request Nov 13, 2013
Fixing default cors settings
@sideshowcoder sideshowcoder merged commit 7ae1036 into sideshowcoder:master Nov 13, 2013
@runemadsen
Copy link
Collaborator Author

👍

sideshowcoder added a commit that referenced this pull request Nov 19, 2014
Fixing default cors settings
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.

None yet

2 participants