mssql: give TLS a host name when the server is an address

Node 25 refuses an IP address as the TLS server name, and the module reaches its server on
loopback, so every connection failed on the live machines. The certificate is trusted either way.
This commit is contained in:
jochen
2026-10-04 01:31:31 +02:00
parent 84609c0373
commit 6171d747db
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ declare module "mssql" {
user?: string;
password?: string;
database?: string;
options?: { encrypt?: boolean; trustServerCertificate?: boolean };
options?: { encrypt?: boolean; trustServerCertificate?: boolean; serverName?: string };
pool?: { min?: number; max?: number };
connectionTimeout?: number;
requestTimeout?: number;