문제

I follow the guide getting started from getting started

For enable CORS the guide proposes this command:

    $ curl -X PUT $HOST/_config/httpd/enable_cors -d '"true"'
    $ curl -X PUT $HOST/_config/cors/origins -d '"*"'
    $ curl -X PUT $HOST/_config/cors/credentials -d '"true"'
    $ curl -X PUT $HOST/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"'
    $ curl -X PUT $HOST/_config/cors/headers -d \
      '"accept, authorization, content-type, origin"

But I read in the file default.ini, that I can’t set origins: * and credentials = true at the same time. In effect if I follow the above command the synchronization work well.

Why therefore default.ini say that isn't possible set origins: * and credentials = true?

도움이 되었습니까?

해결책

Because the CORS spec says so:

http://www.w3.org/TR/cors/#resource-requests 6.1.3

Have you tried replicating using CORS from two different hosts using credentials with the * setting? If that works that is a bug in CouchDB and we should fix it. Note that CouchDB will allow you to configure things as you describe, but you shouldn’t be able to replicate with credentials across hosts then.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top