How to disable SNI for HTTPS requests?
- Node.js Version:6.9.5
- OS: windows
- Scope (install, code, runtime, meta, other?):code
- Module (and version) (if relevant):https
How can I disable the SNI(Server Name Indication) TLS extension for https.request ?
Perhaps if you pass a custom .createConnection function to https.request() that calls tls.connect() without setting the .servername property.
Untested though, and why would you want to disable it in the first place?
I agree with @bnoordhuis querying the motivation, however, there may still be an increasingly small proportion of cases remaining where SNI does impose a limitation interacting with old browsers and legacy OSes/mobile (IoT?) devices.
Apart from the approach suggested above, you might still consider the continuing validity of options in an old thread such as this and the sufficiency, or otherwise of process.features.tls_sn = false?
Using a custom .createConnection without the servername property can disable SNI.