Fixing default cors settings #9

Merged
merged 3 commits into from Nov 13, 2013

Projects

None yet

2 participants

@runemadsen
Collaborator

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

@runemadsen
Collaborator

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
Collaborator

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
Owner

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

@sideshowcoder sideshowcoder merged commit 7ae1036 into sideshowcoder:master Nov 13, 2013

1 check passed

Details default The Travis CI build passed
@runemadsen
Collaborator

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment