Is it possible to enable the Couchbase Lite REST API to support preflight OPTIONS requests?
I am developing an Ionic / Cordova hybrid app. In my development environment, I use ionic’s “emulate” command, which kicks off the iOS simulator with source files hosted in a local web server to enable live reloading. This has the side effect of creating a CORS situation, causing UIWebView to send OPTIONS requests to the local REST API host (http://lite.couchbase.) for certain types of requests. The API fails on these requests and does not complete the intended database operation.
I’m able to get around this for simple requests (https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Simple_requests) but can’t avoid it for DELETEs, for instance.
If Couchbase Lite could handle these OPTIONS requests it would make my development workflow much simpler.