diff options
author | Fedor Indutny <fedor@indutny.com> | 2019-04-19 22:51:24 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-04-30 16:43:22 +0300 |
commit | 98e9de7db930e505884ca8d0ca6588afbe43f127 (patch) | |
tree | 40c1326558a751bfd2d3fcb46f121767c86d428d /doc/api/https.md | |
parent | 524dd469cefb63c9963a9c7a99197df857888f1a (diff) |
http: `servername === false` should disable SNI
There is no way to disable SNI extension when sending a request to HTTPS
server. Setting `options.servername` to a falsy value would make Node.js
core override it with either hostname or ip address.
This change introduces a way to disable SNI completely if this is
required for user's application. Setting `options.servername` to ``
in `https.request` would disable overrides and thus disable the
extension.
PR-URL: https://github.com/nodejs/node/pull/27316
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/https.md')
-rw-r--r-- | doc/api/https.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api/https.md b/doc/api/https.md index 95e7e715c32..9b6ec83a6e7 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -29,6 +29,10 @@ An [`Agent`][] object for HTTPS similar to [`http.Agent`][]. See Can have the same fields as for [`http.Agent(options)`][], and * `maxCachedSessions` {number} maximum number of TLS cached sessions. Use `0` to disable TLS session caching. **Default:** `100`. + * `servername` {string} the value of + [Server Name Indication extension][sni wiki] to be sent to the server. Use + empty string `''` to disable sending the extension. + **Default:** hostname or IP address of the target server. See [`Session Resumption`][] for infomation about TLS session reuse. @@ -406,3 +410,4 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p [`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener [`Session Resumption`]: tls.html#tls_session_resumption +[sni wiki]: https://en.wikipedia.org/wiki/Server_Name_Indication |