rejectUnauthorized
The Node.js TLS option, true by default, that makes a connection fail when the server's certificate cannot be verified.
With it disabled any attacker on the network can impersonate the server and read or change all traffic.
In more detail
Setting it to false, or setting NODE_TLS_REJECT_UNAUTHORIZED=0, turns off certificate checks entirely. Trust an internal certificate authority with the ca option instead.
Related terms
- TLS certificate — A signed digital document that proves a server really owns a domain name and holds the key used to start encrypted TLS connections.
- man-in-the-middle attack — An attack where someone secretly sits between two parties, relaying and possibly altering their traffic while each thinks it talks to the other.
- node:tls — The built-in Node.js module for TLS connections and settings, used underneath node:https and HTTP/2 over TLS.
Taught in
- TLS & HTTPS Encryption: Certificates & SNI Contexts — Node.js Internals & Backend Services