server.addContext()
The Node.js TLS server method that registers a certificate and key for a host name, chosen automatically when a client asks for that name through SNI.
In more detail
It lets one HTTPS server terminate TLS for many domains. For certificates loaded on demand, the SNICallback option does the same dynamically.
Related terms
- Server Name Indication — A TLS extension where the client names the host it wants in the first handshake message, so one IP address can serve certificates for many domains.
- node:tls — The built-in Node.js module for TLS connections and settings, used underneath node:https and HTTP/2 over TLS.
- 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.
Taught in
- TLS & HTTPS Encryption: Certificates & SNI Contexts — Node.js Internals & Backend Services