Skip to content

Instantly share code, notes, and snippets.

@wdalmut
Created December 9, 2013 07:37
Show Gist options
  • Save wdalmut/7868672 to your computer and use it in GitHub Desktop.
Save wdalmut/7868672 to your computer and use it in GitHub Desktop.
CouchDB CORS conf
$ export HOST=http://couchdb.127.0.0.1.xip.io:5984
$ curl -X PUT $HOST/_config/httpd/enable_cors -d '"true"'
$ curl -X PUT $HOST/_config/cors/origins -d '"http://app.127.0.0.1.xip.io:9000"'
$ 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"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment