summaryrefslogtreecommitdiff
path: root/doc/api/https.markdown
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-08-30 15:14:37 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-09-15 00:19:06 +0200
commit35607f3a2dda03af8cf2dd3704c0c915e28aa774 (patch)
tree95a92b0aff7a248a9879054c29e4ba6a0acb8836 /doc/api/https.markdown
parent4c171a504d2357185efab21e81b33e2dee1ab1da (diff)
downloadnode-35607f3a2dda03af8cf2dd3704c0c915e28aa774.tar.gz
tls, https: validate server certificate by default
This commit changes the default value of the rejectUnauthorized option from false to true. What that means is that tls.connect(), https.get() and https.request() will reject invalid server certificates from now on, including self-signed certificates. There is an escape hatch: if you set the NODE_TLS_REJECT_UNAUTHORIZED environment variable to the literal string "0", node.js reverts to its old behavior. Fixes #3949.
Diffstat (limited to 'doc/api/https.markdown')
-rw-r--r--doc/api/https.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/https.markdown b/doc/api/https.markdown
index e2c9862a0..943395a55 100644
--- a/doc/api/https.markdown
+++ b/doc/api/https.markdown
@@ -119,7 +119,7 @@ The following options from [tls.connect()][] can also be specified. However, a
- `rejectUnauthorized`: If `true`, the server certificate is verified against
the list of supplied CAs. An `'error'` event is emitted if verification
fails. Verification happens at the connection level, *before* the HTTP
- request is sent. Default `false`.
+ request is sent. Default `true`.
In order to specify these options, use a custom `Agent`.