--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/5204C308.20600%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CAD2UGCXV6y24cKfFO8L_0dAS8GW03N2TxR5Y4PH2ACwWw0SEGA%40mail.gmail.com.
var db = new PouchDB('dbname'); db.allDocs(....
Unless you have any particular reason not to,
Cheers, Dale
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/5204C839.1080708%40gmail.com.
db.query({map: map}, {reduce: false, key: somekey }, function(err, response) { }); or even
db.query({map: map}, {reduce: false, startkey: firsKey, endkey: lastKey}, function(err, response) { });
Thanks Isidro
--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/d38f42b9-d0e5-43b6-b29e-111adba12013%40googlegroups.com.
Yes i have quotes. Yes the user has permissions.
An identical replicate request works with curl, but not with pouch.
I started couchdb with the log level at "debug". I see that Pouch does not set the Authentication header in the replication request. There is also a preflight request that omits the Authentication header.
The Authentication header should be set, correct?
-NRW
I don't see any Authentication header here.
Ok, I was fooled by the cookie magic. I had an 'AuthSession' cookie, that's why it was working. I think I got it from logging into CouchDB manually, in the browser, and then my app started to work forever, even with Pouch effectively wiping out the auth part of the url in each of its requests. I think it is a bug. Let's try to fix it.
--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/09e960eb-776f-4412-9a59-7757d2dd407f%40googlegroups.com.
DaleCheersSolution 3: Cookies shouldnt have any cross domain issues, you need to have a server configured correctly so you can authorise and receive a cookie from a remote domain CORS,, but you should be receiving it for that host and it will only be sent / be valid for that host, there is some setup for CORS in http://pouchdb.com/getting-started.htmlSolution 2: My bad, Giovanni submitted a patch which has been merged, however the nightly server wasnt running to the update wasnt applied, this should work against the latest nightly without changesShould do though, this is an API we could likely clean upHey PaulSolution 1: So the first one wont work, the opts need to be passed to the contructor of the Pouch objectvar remote = new PouchDB('http://testdb....', {
auth: {username: 'testuser', password: 'testuserPassword'}
}};db.replicate.to(remote);
On 19 September 2013 08:43, Paul Weber <paul....@area811.com> wrote:
I took another look at the authentication problem using pouchdb.nightly - 2013-08-25T17:29:48. To me it also looks like a bug in the HttpPouch function (https://github.com/daleharvey/pouchdb/blob/master/src/adapters/pouch.http.js).I changed the URL of the remote database to "https://testdb.iriscouch.com/testdb" in the following examples because that's what I eventually what to do. PouchDb is served from "http://localhost:5000".Solution 1:var opts = {auth: {username: 'testuser', password: 'testuserPassword'}};This doesn't work because opts.auth is always undefined in the HttpPouch function and therefor host.headers.Authorization is never being set.Solution 2: