0
I’m making a post request through the Vue.js, to create a document in the Couchdb, I enabled Cors in couchdb with *, left the database enabled for the user admin and made the following code:
var csrfmiddlewaretoken = document.getElementsByName('csrfmiddlewaretoken')[0].value;
var cred_ = btoa('admin:admin')
var form:{
nome:"Fulano"
}
this.$http.post('http://127.0.0.1:5984/formulario/data
form,
{headers:{
"X-CSRFToken":csrfmiddlewaretoken,
"Authorization":"Basic "+cred_,
}
}).then(function(response) {
console.log(response)
}, function(response) {
console.log(response)
});
The following error is shown:
Same Origin Policy (Same Origin Policy) prevents reading the remote resource in...