@itentialopensource/adapter-utils 5.11.0 → 6.0.0
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/lib/connectorRest.js +17 -17
- package/package.json +1 -1
- package/schemas/propertiesSchema.json +2 -2
package/lib/connectorRest.js
CHANGED
|
@@ -86,7 +86,7 @@ let sso = null;
|
|
|
86
86
|
const tokenList = [];
|
|
87
87
|
const tokenlock = 0;
|
|
88
88
|
let stub = false;
|
|
89
|
-
let protocol = '
|
|
89
|
+
let protocol = 'https';
|
|
90
90
|
let healthcheckpath = null;
|
|
91
91
|
let throttleEnabled = false;
|
|
92
92
|
let numberPhs = 1;
|
|
@@ -103,7 +103,7 @@ let secureProtocol = null;
|
|
|
103
103
|
let proxyEnabled = false;
|
|
104
104
|
let proxyHost = null;
|
|
105
105
|
let proxyPort = null;
|
|
106
|
-
let proxyProtocol = '
|
|
106
|
+
let proxyProtocol = 'https';
|
|
107
107
|
let proxyUser = null;
|
|
108
108
|
let proxyPassword = null;
|
|
109
109
|
let numRetries = 3;
|
|
@@ -578,28 +578,28 @@ function makeRequest(request, entitySchema, callProperties, startTrip, attempt,
|
|
|
578
578
|
} else if (stub) {
|
|
579
579
|
return callback(returnStub(request, entitySchema, callProperties));
|
|
580
580
|
}
|
|
581
|
-
let useProt =
|
|
582
|
-
let protStr = '
|
|
581
|
+
let useProt = https;
|
|
582
|
+
let protStr = 'https';
|
|
583
583
|
|
|
584
584
|
try {
|
|
585
585
|
// determine proper protocol for primary request
|
|
586
586
|
if (callProperties && callProperties.protocol) {
|
|
587
|
-
if (callProperties.protocol === '
|
|
588
|
-
log.debug(`${origin}: Switching to
|
|
589
|
-
useProt =
|
|
590
|
-
protStr = '
|
|
587
|
+
if (callProperties.protocol === 'http') {
|
|
588
|
+
log.debug(`${origin}: Switching to http protocol`);
|
|
589
|
+
useProt = http;
|
|
590
|
+
protStr = 'http';
|
|
591
591
|
}
|
|
592
592
|
} else if (entitySchema && entitySchema.sso && entitySchema.sso.protocol) {
|
|
593
593
|
// this is for single signon - should we limit to token???
|
|
594
|
-
if (entitySchema.sso.protocol === '
|
|
595
|
-
log.debug(`${origin}: Switching to
|
|
596
|
-
useProt =
|
|
597
|
-
protStr = '
|
|
598
|
-
}
|
|
599
|
-
} else if (protocol === '
|
|
600
|
-
log.debug(`${origin}: Switching to
|
|
601
|
-
useProt =
|
|
602
|
-
protStr = '
|
|
594
|
+
if (entitySchema.sso.protocol === 'http') {
|
|
595
|
+
log.debug(`${origin}: Switching to http protocol`);
|
|
596
|
+
useProt = http;
|
|
597
|
+
protStr = 'http';
|
|
598
|
+
}
|
|
599
|
+
} else if (protocol === 'http') {
|
|
600
|
+
log.debug(`${origin}: Switching to http protocol`);
|
|
601
|
+
useProt = http;
|
|
602
|
+
protStr = 'http';
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
// add the proxy information to the request
|
package/package.json
CHANGED
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"protocol": {
|
|
91
91
|
"type": "string",
|
|
92
92
|
"description": "the protocol to use to connect to server",
|
|
93
|
-
"default": "
|
|
93
|
+
"default": "https",
|
|
94
94
|
"enum": [
|
|
95
95
|
"http",
|
|
96
96
|
"https"
|
|
@@ -825,7 +825,7 @@
|
|
|
825
825
|
"protocol": {
|
|
826
826
|
"type": "string",
|
|
827
827
|
"description": "the protocol to use to connect to the proxy",
|
|
828
|
-
"default": "
|
|
828
|
+
"default": "https",
|
|
829
829
|
"enum": [
|
|
830
830
|
"http",
|
|
831
831
|
"https",
|