I am trying to move from Cloudant to Jelastic on flow.ch. I am getting CORS errors with pouchdb when testing locally (ionic serve).
Is there any other configuration in Jelastic besides CouchDB I am missing?
XMLHttpRequest cannot load http://xxx.flow.ch/xxx. Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:8100' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
You can’t set
origins = *
andcredentials = true
option at the same time
So if you want cross-origin requests with credentials to work with couchdb, you must set the origins
value to an explicit list of allowed origins; for example:
[cors]
origins = http://localhost, https://localhost, http://couch.mydev.name:8080