Previous posts — 1 , 2
What I have now: AngularJS app with two controllers. First works with CouchDB documents and the second perform sign-in requests to
When I open application, I can't do editing with couchdb (in first controller), because some actions I've limited to logged users only. In second controller I'm sending simple POST over
, which return
(so no cookie magic there) auth cookie
. That cookie bound to couchdb address and in theory any request from page to couchdb address must contain that cookie also.
But this no happens. No one call to couchdb, except calls to
In learning Angular and CouchDB I came to deadlock.
What I'm doing wrong? I do not want to hide couchdb behind something with custom auth — too complex and not a good way, I think.
header also fails — it not available in
HttpPromise.success(function (data, status, headers, config))
. I'm tried to get it like
— no luck.
Maybe something wrong in couchdb configuration? I've uploaded it to pastebin