Skip to content

Commit 529f7fb

Browse files
committed
Mention rejectUnauthorized
1 parent 599938d commit 529f7fb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/Drivers/JS/Reference/Database/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,23 @@ If _config_ is a string, it will be interpreted as _config.url_.
4848
your certificates to the _agentOptions_, e.g.:
4949

5050
```js
51+
...
5152
agentOptions: {
5253
ca: [
5354
fs.readFileSync(".ssl/sub.class1.server.ca.pem"),
5455
fs.readFileSync(".ssl/ca.pem")
55-
];
56+
]
57+
}
58+
```
59+
60+
Although this is **strongly discouraged**, it's also possible to disable
61+
HTTPS certificate validation entirely, but note this has
62+
**extremely dangerous** security implications:
63+
64+
```js
65+
...
66+
agentOptions: {
67+
rejectUnauthorized: false
5668
}
5769
```
5870

0 commit comments

Comments
 (0)