Replicate couchdb to pouchdb using cookie

128 views
Skip to first unread message

Binh Nguyen

unread,
Jul 4, 2015, 2:45:26 PM7/4/15
to pou...@googlegroups.com
Hi,

I am trying to replicate a couchdb document  to pouchdb using cookie set in `ajax.headers: {Cookie, cookieString}` but then I get "Refused to set unsafe header "cookie".
What is a good way to use cookie here? I already know about pouchdb-authentication but I cannot use it in our application because our couchdb is read-only from the outside. 

Thanks

Nolan Lawson

unread,
Jul 9, 2015, 10:56:28 AM7/9/15
to pou...@googlegroups.com, ngb...@gmail.com
Hi Binh,

If your CouchDB is read-only, then you will need to have some kind of authentication layer between your client and CouchDB. You cannot manually set cookies like that, as the browser is warning you.

I strongly recommend you just use pouchdb-authentication and whitelist some operations to allow them to get through (e.g. the /_users and /_session endpoints).

Cheers,
Nolan

Vahid Mousavi

unread,
Dec 10, 2016, 12:03:52 PM12/10/16
to PouchDB, ngb...@gmail.com
hi nolan
i have the same problem, actually i do not know the user's username/password and we are using a scenario in which we cannot ask those credentials at a point and
I need to send the auth cookie which I have gotten from another proxy service but i can't.
can give me a solution for that?
Reply all
Reply to author
Forward
0 new messages