javascript - Enable CORS on Cloudant local -
i have setup cloudant local database using docker image.
when try send in cloudant query using javascript application hosted on localhost:8000 gives me cors error.
how enable cors on cloudant local? have tried following
- put request described in https://docs.cloudant.com/cors.html#setting-the-cors-configuration
- checked dashboard local instance not have "account" tab available.

same answer @anirus, there's very kludgy way around it. if have named container cloudant-developer in current instructions @ https://hub.docker.com/r/ibmcom/cloudant-developer/:
save stock
default.inifile locally:docker exec cloudant-developer cat /opt/cloudant/etc/default.ini > default.inimodify
enable_cors = trueinstead offalsein
[cors]section, add lineorigins = http://localhost:3000. should take comma delimited list, you're working on 1 app @ time.volume mount modified
default.inion original whenever run container adding-v `pwd`/default.ini:/opt/cloudant/etc/default.inidocker's list of command line arguments:docker run --privileged --detach --volume cloudant:/srv -v `pwd`/default.ini:/opt/cloudant/etc/default.ini --name cloudant-developer --publish 8080:80 --hostname cloudant.dev ibmcom/cloudant-developer
Comments
Post a Comment