We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e38aeea commit 780ab4dCopy full SHA for 780ab4d
lib/base/connection.js
@@ -345,7 +345,10 @@ class BaseConnection extends EventEmitter {
345
});
346
const rejectUnauthorized = this.config.ssl.rejectUnauthorized;
347
const verifyIdentity = this.config.ssl.verifyIdentity;
348
- const servername = this.config.host;
+ // only set servername for SNI and identity check if host is not an IP address
349
+ const servername = Net.isIP(this.config.host)
350
+ ? undefined
351
+ : this.config.host;
352
353
let secureEstablished = false;
354
this.stream.removeAllListeners('data');
0 commit comments