From ab869063c9435d9a668b2efa48ffeca9f3b6d4d0 Mon Sep 17 00:00:00 2001 From: Trip-eng Date: Fri, 5 Mar 2021 20:29:53 +0100 Subject: [PATCH 1/3] Add Self Signed Option --- src/main.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main.html b/src/main.html index e474393..abcf2f8 100644 --- a/src/main.html +++ b/src/main.html @@ -11,6 +11,12 @@ + + +
+ + +
@@ -48,7 +54,11 @@ tls: { value: true, required: true - } + }, + selfsigned: { + value: false, + required: true + } }, credentials: { token: { From 67811ddfe8db2f8f019a9fafcf53429ff439293a Mon Sep 17 00:00:00 2001 From: Trip-eng Date: Fri, 5 Mar 2021 20:31:49 +0100 Subject: [PATCH 2/3] Add Self Signed Option --- src/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 6ff0ebf..7e8ad47 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,7 @@ module.exports = (RED) => { 'use strict'; const Influxdb = require('influxdb-v2'); + const https = require('https'); function InfluxDbV2Node(config) { RED.nodes.createNode(this, config); @@ -11,7 +12,12 @@ module.exports = (RED) => { host: config.host, port: config.port, protocol: config.tls ? 'https' : 'http', - token: this.credentials.token + token: this.credentials.token, + fetchOptions: { + agent: new https.Agent({ + rejectUnauthorized: !config.selfsigned + }) + } }); }; From c996e680a2bba47da7b3fe33036a7d6ea1cf1acb Mon Sep 17 00:00:00 2001 From: Trip-eng Date: Fri, 5 Mar 2021 20:35:03 +0100 Subject: [PATCH 3/3] rm
--- src/main.html | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.html b/src/main.html index abcf2f8..9913f4f 100644 --- a/src/main.html +++ b/src/main.html @@ -11,7 +11,6 @@ -