You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,23 @@ const opts = {
226
226
constdb=require('nano')(opts);
227
227
```
228
228
229
+
Nano works perfectly well over HTTPS as long as the SSL cert is signed by a certification authority known by your client operating system. If you have a custom or self-signed certificate, you may need to create your own HTTPS agent and pass it to Nano e.g.
230
+
231
+
```js
232
+
consthttpsAgent=newhttps.Agent({
233
+
ca:'/path/to/cert',
234
+
rejectUnauthorized:true,
235
+
keepAlive:true,
236
+
maxSockets:6
237
+
})
238
+
constnano=Nano({
239
+
url:process.env.COUCH_URL,
240
+
requestDefaults: {
241
+
agent: httpsAgent,
242
+
}
243
+
})
244
+
```
245
+
229
246
Please check [axios] for more information on the defaults. They support features like proxies, timeout etc.
230
247
231
248
You can tell nano to not parse the URL (maybe the server is behind a proxy, is accessed through a rewrite rule or other):
0 commit comments