Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 72e66c9

Browse files
committed
Set parseUrl = false on underlying Nano instance.
Ensure that Nano always returns a server object.
1 parent 3963423 commit 72e66c9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# 3.0.0 UNRELEASED
22
- [FIXED] Expose `BasePlugin` type in Cloudant client.
3+
- [FIXED] Set `parseUrl = false` on underlying Nano instance.
34
- [REMOVED] Remove nodejs-cloudant TypeScript type definitions for
45
`db.search`. These definitions are now imported directly from Nano.
56
- [REMOVED] Removed support for the deprecated Cloudant virtual hosts feature.

cloudant.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ function Cloudant(options, callback) {
5555
return cloudantClient.request(req, callback);
5656
};
5757

58-
var nanoOptions = { url: creds.outUrl, request: cloudantRequest, log: nanodebug };
58+
var nanoOptions = {
59+
log: nanodebug,
60+
parseUrl: false, // always return server object
61+
request: cloudantRequest,
62+
url: creds.outUrl
63+
};
5964
if (options.cookie) {
6065
nanoOptions.cookie = options.cookie; // legacy - sets 'X-CouchDB-WWW-Authenticate' header
6166
}

0 commit comments

Comments
 (0)