Add SNI support
This commit is contained in:
@@ -44,8 +44,9 @@ export class MqttSource implements DataSource<MqttOptions> {
|
|||||||
username: options.username,
|
username: options.username,
|
||||||
password: options.password,
|
password: options.password,
|
||||||
clientId: options.clientId,
|
clientId: options.clientId,
|
||||||
|
servername: options.tls ? url.host : undefined,
|
||||||
ca: options.certificateAuthority ? Buffer.from(options.certificateAuthority, 'base64') : undefined,
|
ca: options.certificateAuthority ? Buffer.from(options.certificateAuthority, 'base64') : undefined,
|
||||||
})
|
} as any)
|
||||||
|
|
||||||
this.client = client
|
this.client = client
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user