@tiledesk/tiledesk-tybot-connector 0.1.38 → 0.1.39

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,9 @@
5
5
  available on:
6
6
  ▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
7
7
 
8
+ ### 0.1.39 - online
9
+ - ExtApi.sendSupportMessageExt => added support for rejectUnauthorized: false
10
+
8
11
  ### 0.1.38 - online
9
12
  - tiledesk-client => 0.9.3
10
13
 
package/ExtApi.js CHANGED
@@ -1,4 +1,5 @@
1
1
  let axios = require('axios');
2
+ let https = require("https");
2
3
 
3
4
  class ExtApi {
4
5
 
@@ -109,14 +110,20 @@ class ExtApi {
109
110
  console.log("API URL:", options.url);
110
111
  console.log("** Options:", options);
111
112
  }
112
- axios(
113
- {
114
- url: options.url,
115
- method: options.method,
116
- data: options.json,
117
- params: options.params,
118
- headers: options.headers
119
- })
113
+ let axios_options = {
114
+ url: options.url,
115
+ method: options.method,
116
+ data: options.json,
117
+ params: options.params,
118
+ headers: options.headers
119
+ }
120
+ if (options.url.startsWith("https:")) {
121
+ const httpsAgent = new https.Agent({
122
+ rejectUnauthorized: false,
123
+ });
124
+ axios_options.httpsAgent = httpsAgent;
125
+ }
126
+ axios(axios_options)
120
127
  .then((res) => {
121
128
  if (this.log) {
122
129
  console.log("Response for url:", options.url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {