@gregoriusrippenstein/node-red-contrib-introspection 0.11.4 → 0.11.5

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.
@@ -10,6 +10,9 @@
10
10
  flowVersion: {
11
11
  value: "v1"
12
12
  },
13
+ useHttps: {
14
+ value: false
15
+ },
13
16
  useAuthentication: {
14
17
  value:false
15
18
  },
@@ -82,9 +85,18 @@
82
85
  </select>
83
86
  </div>
84
87
 
88
+ <div class="form-row">
89
+ <label for="node-input-useHttps">
90
+ <i class="fa fa-clown"></i>
91
+ <span>Use HTTPS?</span>
92
+ </label>
93
+ <input type="checkbox" id="node-input-useHttps"
94
+ style="display:inline-block; width:15px; vertical-align:baseline;">
95
+ </div>
96
+
85
97
  <div class="form-row">
86
98
  <label for="node-input-useAuthentication">
87
- <i class="fa "></i>
99
+ <i class="fa fa-key"></i>
88
100
  <span>Use Authentication?</span>
89
101
  </label>
90
102
 
@@ -12,7 +12,7 @@ module.exports = function(RED) {
12
12
  node.on("input", function(msg, send, done) {
13
13
  var os = require('os');
14
14
 
15
- var baseUrl = "http://" + os.hostname() + ":" + RED.settings.get("uiPort");
15
+ var baseUrl = `${cfg.useHttps ? "https" : "http"}://` + os.hostname() + ":" + RED.settings.get("uiPort");
16
16
  if ( RED.settings.get("httpAdminRoot") != "/" ) {
17
17
  baseUrl += RED.settings.get("httpAdminRoot");
18
18
  }
@@ -22,6 +22,9 @@ module.exports = function(RED) {
22
22
  headers: {
23
23
  "Node-RED-API-Version": cfg.flowVersion,
24
24
  ...hdrs
25
+ },
26
+ https: {
27
+ rejectUnauthorized: false
25
28
  }
26
29
  }).then( res => {
27
30
  var bodySize = res.body.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gregoriusrippenstein/node-red-contrib-introspection",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
4
4
  "dependencies": {
5
5
  "got": "^13",
6
6
  "uglify-js": "^3.17.4",