lifecycleion 0.0.17 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,6 +34,20 @@ interface NodeAdapterConfig {
34
34
  * either. Does not require a client certificate — use `mtls` for that.
35
35
  */
36
36
  ca?: string | Buffer | Array<string | Buffer>;
37
+ /**
38
+ * TLS server name (SNI) to send in the handshake and verify the server
39
+ * certificate against. Required when dialing by IP address but the server
40
+ * cert's SAN lists a DNS name — without this, TLS verification fails because
41
+ * the IP does not match the DNS SAN.
42
+ *
43
+ * Typical pattern when using a service registry:
44
+ * baseURL: 'https://10.0.0.5:443' ← IP from the registry (where bytes go)
45
+ * servername: 'billing.internal' ← DNS name on the cert (TLS identity)
46
+ *
47
+ * The Host header defaults to the baseURL hostname (the IP). If the backend
48
+ * routes by Host, also set defaultHeaders: { host: 'billing.internal' }.
49
+ */
50
+ servername?: string;
37
51
  /**
38
52
  * Set to false to accept self-signed certificates in dev/test environments.
39
53
  * Defaults to true (Node.js default — rejects invalid certs).
@@ -34,6 +34,20 @@ interface NodeAdapterConfig {
34
34
  * either. Does not require a client certificate — use `mtls` for that.
35
35
  */
36
36
  ca?: string | Buffer | Array<string | Buffer>;
37
+ /**
38
+ * TLS server name (SNI) to send in the handshake and verify the server
39
+ * certificate against. Required when dialing by IP address but the server
40
+ * cert's SAN lists a DNS name — without this, TLS verification fails because
41
+ * the IP does not match the DNS SAN.
42
+ *
43
+ * Typical pattern when using a service registry:
44
+ * baseURL: 'https://10.0.0.5:443' ← IP from the registry (where bytes go)
45
+ * servername: 'billing.internal' ← DNS name on the cert (TLS identity)
46
+ *
47
+ * The Host header defaults to the baseURL hostname (the IP). If the backend
48
+ * routes by Host, also set defaultHeaders: { host: 'billing.internal' }.
49
+ */
50
+ servername?: string;
37
51
  /**
38
52
  * Set to false to accept self-signed certificates in dev/test environments.
39
53
  * Defaults to true (Node.js default — rejects invalid certs).
@@ -460,6 +460,9 @@ var NodeAdapter = class {
460
460
  if (this._config.ca) {
461
461
  httpsOptions.ca = this._config.ca;
462
462
  }
463
+ if (this._config.servername) {
464
+ httpsOptions.servername = this._config.servername;
465
+ }
463
466
  if (this._config.mtls) {
464
467
  httpsOptions.cert = this._config.mtls.cert;
465
468
  httpsOptions.key = this._config.mtls.key;