authscape 1.0.670 → 1.0.672
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/dist/Container.module.css +103 -0
- package/dist/Item.module.css +135 -0
- package/index.js +554 -513
- package/package.json +1 -1
- package/src/services/PrivateLabelPageModule.js +22 -10
package/package.json
CHANGED
|
@@ -15,27 +15,39 @@ export async function PrivateLabelPageModule(apiUri, host) {
|
|
|
15
15
|
const response = await fetch(apiUri + "/api/PrivateLabel/GetCompanyIdFromDomain?domain=" + host);
|
|
16
16
|
if (response.status == 200)
|
|
17
17
|
{
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
18
|
+
var dataResponse = await response.json();
|
|
19
|
+
if (dataResponse != null)
|
|
20
20
|
{
|
|
21
|
-
if (
|
|
21
|
+
if (dataResponse.companyId != null)
|
|
22
22
|
{
|
|
23
|
-
data.oemCompanyId =
|
|
23
|
+
data.oemCompanyId = dataResponse.companyId;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
if (
|
|
26
|
+
if (dataResponse.demoCompanyId != null)
|
|
27
27
|
{
|
|
28
|
-
data.demoId =
|
|
28
|
+
data.demoId = dataResponse.demoCompanyId;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
if (
|
|
31
|
+
if (dataResponse.favIcon != null)
|
|
32
32
|
{
|
|
33
|
-
data.favIcon =
|
|
33
|
+
data.favIcon = dataResponse.favIcon;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
if (
|
|
36
|
+
if (dataResponse.companyName != null)
|
|
37
37
|
{
|
|
38
|
-
data.companyName =
|
|
38
|
+
data.companyName = dataResponse.companyName;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// check for redirect
|
|
42
|
+
if (dataResponse.redirectTrafficToCanonical)
|
|
43
|
+
{
|
|
44
|
+
const hasWWW = host.startsWith('www.');
|
|
45
|
+
if (hasWWW) {
|
|
46
|
+
data.redirect = {
|
|
47
|
+
destination: dataResponse.canonicalBaseUrl, // Replace with your target URL
|
|
48
|
+
permanent: false, // Set to true for a permanent redirect (HTTP 308)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
39
51
|
}
|
|
40
52
|
}
|
|
41
53
|
}
|