couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pulkit Singhal <>
Subject How to add IP address field to documents
Date Thu, 07 Jun 2012 14:25:00 GMT
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:

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?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message