authscape 1.0.674 → 1.0.676
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/index.js +30 -24
- package/package.json +1 -1
- package/src/services/PrivateLabelPageModule.js +6 -4
package/index.js
CHANGED
|
@@ -9207,39 +9207,45 @@ function _PrivateLabelPageModule() {
|
|
|
9207
9207
|
case 4:
|
|
9208
9208
|
response = _context.sent;
|
|
9209
9209
|
if (!(response.status == 200)) {
|
|
9210
|
-
_context.next =
|
|
9210
|
+
_context.next = 16;
|
|
9211
9211
|
break;
|
|
9212
9212
|
}
|
|
9213
9213
|
_context.next = 8;
|
|
9214
9214
|
return response.json();
|
|
9215
9215
|
case 8:
|
|
9216
9216
|
dataResponse = _context.sent;
|
|
9217
|
-
if (dataResponse != null) {
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9217
|
+
if (!(dataResponse != null)) {
|
|
9218
|
+
_context.next = 16;
|
|
9219
|
+
break;
|
|
9220
|
+
}
|
|
9221
|
+
if (dataResponse.companyId != null) {
|
|
9222
|
+
data.oemCompanyId = dataResponse.companyId;
|
|
9223
|
+
}
|
|
9224
|
+
if (dataResponse.demoCompanyId != null) {
|
|
9225
|
+
data.demoId = dataResponse.demoCompanyId;
|
|
9226
|
+
}
|
|
9227
|
+
if (dataResponse.favIcon != null) {
|
|
9228
|
+
data.favIcon = dataResponse.favIcon;
|
|
9229
|
+
}
|
|
9230
|
+
if (dataResponse.companyName != null) {
|
|
9231
|
+
data.companyName = dataResponse.companyName;
|
|
9232
|
+
}
|
|
9230
9233
|
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
// Replace with your target URL
|
|
9236
|
-
permanent: false // Set to true for a permanent redirect (HTTP 308)
|
|
9237
|
-
};
|
|
9238
|
-
}
|
|
9234
|
+
// check for redirect
|
|
9235
|
+
if (!dataResponse.redirectTrafficToCanonical) {
|
|
9236
|
+
_context.next = 16;
|
|
9237
|
+
break;
|
|
9239
9238
|
}
|
|
9240
|
-
|
|
9239
|
+
return _context.abrupt("return", {
|
|
9240
|
+
redirect: {
|
|
9241
|
+
destination: dataResponse.canonicalBaseUrl,
|
|
9242
|
+
// Replace with your target URL
|
|
9243
|
+
permanent: false // Set to true for a permanent redirect (HTTP 308)
|
|
9244
|
+
}
|
|
9245
|
+
});
|
|
9246
|
+
case 16:
|
|
9241
9247
|
return _context.abrupt("return", data);
|
|
9242
|
-
case
|
|
9248
|
+
case 17:
|
|
9243
9249
|
case "end":
|
|
9244
9250
|
return _context.stop();
|
|
9245
9251
|
}
|
package/package.json
CHANGED
|
@@ -41,10 +41,12 @@ export async function PrivateLabelPageModule(apiUri, host) {
|
|
|
41
41
|
// check for redirect
|
|
42
42
|
if (dataResponse.redirectTrafficToCanonical)
|
|
43
43
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
return {
|
|
45
|
+
redirect: {
|
|
46
|
+
destination: dataResponse.canonicalBaseUrl, // Replace with your target URL
|
|
47
|
+
permanent: false, // Set to true for a permanent redirect (HTTP 308)
|
|
48
|
+
}
|
|
49
|
+
};
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
}
|