1

I am trying out Iris Couch and I ma having problems posting cross domain. I am posting some simple JSON from within a chrome extension to Iris' couchdb and I get the dreaded 405 (Method Not Allowed)

I have turned CORS on in the CouchDB config, as well as set CORS credentials TRUE

This is my JS code

_save = function (item) {
    var rtrn = $.Deferred();


    $.ajax({
        type: "POST",
        url: 'https://xxxxx.iriscouch.com/notes',
        dataType: 'json',
        contentType: 'application/json',
        data: JSON.stringify(item),            
        xhrFields: {
            withCredentials: true
        },
        crossDomain: true,
        success: function (e) {
            rtrn.resolve();
            console.log(e);
        },
        success: function (e) {
            console.log(e);
        }
    });

    return rtrn.promise();
}

Thank you!

americanslon
  • 4,048
  • 4
  • 32
  • 57
  • Which version of CouchDB is it? CORS is [supported](http://wiki.apache.org/couchdb/CORS) only in Apache CouchDB 1.3+. The blog doesn't mention any update after version 1.2. – Aurélien Bénel Oct 20 '13 at 11:59
  • There is a [forum thread](https://getsatisfaction.com/iriscouch/topics/do_you_offer_cors_support) about a similar problem to yours. – Aurélien Bénel Oct 20 '13 at 12:16

0 Answers0