[
https://issues.apache.org/jira/browse/COUCHDB-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931950#comment-13931950
]
Brad Rhoads commented on COUCHDB-2027:
--------------------------------------
My problem was solved by:
1. adding headers= accept, authorization, content-type, origin into [cors]
section of local.ini // the docs were not clear to me about this
2. Adding an Authorization header in my AJAX request :
$.ajax({
type: "GET",
contentType: "application/json",
dataType: "json",
url: myUrl
beforeSend: setHeader,
error: function (error) {
console.log(error);
},
success: function (remoteAppInfo) {
...
}
});
function setHeader(xhr) {
console.log("setHeader");
xhr.setRequestHeader('Authorization',"Basic " +
btoa("estanteuser:Dnbatfydnkwadm6f"));
}
> CORS should not require authentication on preflight OPTIONS request
> -------------------------------------------------------------------
>
> Key: COUCHDB-2027
> URL: https://issues.apache.org/jira/browse/COUCHDB-2027
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Stéphane Alnet
>
> The discussion in https://github.com/daleharvey/pouchdb/issues/1003 points to
> an issue whereby CouchDB is requiring authentication for preflight OPTIONS
> message where it shouldn't.
--
This message was sent by Atlassian JIRA
(v6.2#6252)