couch-login
Advanced tools
Comparing version 0.1.14 to 0.1.15
@@ -45,2 +45,14 @@ var request = require('request') | ||
this.maxAge = YEAR | ||
// replace with a CA cert string, or an array, or leave as null | ||
// to use the defaults included in node. Only relevant for HTTPS | ||
// couches, of course. | ||
this.ca = null | ||
// set to boolean true or false to specify the strictSSL behavior. | ||
// if left as null, then it'll use whatever node defaults to, which | ||
// is false <=0.8.x, and true >=0.9.x | ||
// | ||
// Again, only relevant for https couches, of course. | ||
this.strictSSL = null | ||
} | ||
@@ -140,2 +152,8 @@ | ||
if (this.ca) | ||
req.ca = this.ca | ||
if (this.strictSSL && this.strictSSL !== null) | ||
req.strictSSL = this.strictSSL | ||
request(req, function (er, res, data) { | ||
@@ -142,0 +160,0 @@ // update cookie. |
@@ -5,3 +5,3 @@ { | ||
"description": "A module for doing logged-in requests to a couchdb server", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -151,2 +151,21 @@ # couch-login | ||
### couch.ca | ||
* {String | Array | null} | ||
A certificate authority string, or an array of CA strings. Only | ||
relevant for HTTPS couches, of course. | ||
Leave as `null` to use the default ca settings built into node. | ||
### couch.strictSSL | ||
* {Boolean | null} | ||
Whether or not to be strict about SSL connections. If left as null, | ||
then use the default setting in node, which is true in node versions | ||
0.9.x and above, and false prior to 0.8.x. | ||
Only relevant for HTTPS couches, of course. | ||
### couch.anonymous() | ||
@@ -153,0 +172,0 @@ |
70866
1020
261