mqtt: rejectUnauthorized: false

This commit is contained in:
Koushik Dutta
2022-11-27 13:49:15 -08:00
parent 39a649ab87
commit 6ed1645400
4 changed files with 5 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/mqtt",
"version": "0.0.59",
"version": "0.0.60",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/mqtt",
"version": "0.0.59",
"version": "0.0.60",
"dependencies": {
"@types/node": "^16.6.1",
"aedes": "^0.46.1",

View File

@@ -41,5 +41,5 @@
"@scrypted/common": "file:../../common",
"@types/nunjucks": "^3.2.0"
},
"version": "0.0.59"
"version": "0.0.60"
}

View File

@@ -57,6 +57,7 @@ export class MqttDeviceBase extends ScriptableDeviceBase implements Settings {
urlWithoutPath.pathname = '';
const client = this.client = connect(urlWithoutPath.toString(), {
rejectUnauthorized: false,
username: this.storage.getItem('username') || undefined,
password: this.storage.getItem('password') || undefined,
});

View File

@@ -257,6 +257,7 @@ class MqttPublisherMixin extends SettingsMixinDeviceBase<any> {
urlWithoutPath.pathname = '';
const client = this.client = connect(urlWithoutPath.toString(), {
rejectUnauthorized: false,
username,
password,
});