Created
July 6, 2015 20:23
-
-
Save Juszczak/0239f53bfdd9a0418d37 to your computer and use it in GitHub Desktop.
Add some generic CORS configuration to your CouchDB using curl. You can always change the configuration by simply going to http://127.0.0.1:5984/_utils/config.html and updating the values. However, these default options are good for getting up and running.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOST=http://name:password@127.0.0.1:5984 # or whatever you got | |
curl -X PUT $HOST/_config/httpd/enable_cors -d '"true"' | |
curl -X PUT $HOST/_config/cors/origins -d '"*"' | |
curl -X PUT $HOST/_config/cors/credentials -d '"true"' | |
curl -X PUT $HOST/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"' | |
curl -X PUT $HOST/_config/cors/headers -d '"accept, authorization, content-type, origin, referer, x-csrf-token"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment