incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: How to add IP address field to documents
Date Thu, 07 Jun 2012 14:40:02 GMT
The signature for validate_doc_update is;

(newDoc, oldDoc, userCtx, secObj)

The request is not exposed (and thus you can't find the IP of the client).


On 7 June 2012 15:25, Pulkit Singhal <> wrote:
> I would like to add an additional field to incoming documents in the
> validate_doc_field method. This field should store client info like the IP
> address. I hope that folks reading this thread find this to be same as
> adding a created_at or last_modified timestamps. And ofcourse the minor
> difference is that timestamps can be generated but for something like
> client ip address, it would have to be picked-up/passed-in from somewhere.
> I'm using CouchDB 1.2.0 and I'm used to the following method signature:
> function (new_doc, old_doc, userCtx) {...}
> But while Google~ing I have found two threads that hint at the existence of
> a different validation signature:
>  1.
>  2.
> Does this new signature actually exist in 1.2.0 or not?
> function (new_doc, old_doc, userCtx, http_headers) {...}
> Overall are there any suggestion on how to add an IP address field to
> documents on the fly?

View raw message