Skip to content

Commit 05547d8

Browse files
authored
Merge pull request #85 from SupahNickie/development
fix for broken vendor communication
2 parents 15c8356 + d866e13 commit 05547d8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"cmpId": 15,
44
"maxCookieLifespanDays" : 390,
55
"cmpGlobalName": "__cmp",
6-
"portalUrl": "https://cdn.digitrust.mgr.consensu.org/1/portal.html",
6+
"globalConsentLocation": "https://cdn.digitrust.mgr.consensu.org/1/portal.html",
77
"globalVendorListLocation": "https://vendorlist.consensu.org/vendorlist.json",
88
"countryCodes": [
99
"GB",

src/lib/portal.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import config from "./config";
22
import Promise from "promise-polyfill";
3+
const metadata = require("../../metadata.json");
34

45
const PORTAL_LOAD_TIMEOUT_MILLISECONDS = 5000;
56
const PORTAL_COMMAND_TIMEOUT_MILLISECONDS = 2000;
@@ -23,7 +24,7 @@ function openGlobalVendorPortal() {
2324
// Only ever create a single iframe
2425
if (!globalVendorPortal) {
2526
globalVendorPortal = new Promise((resolve, reject) => {
26-
const url = config.globalConsentLocation;
27+
const url = (config.globalConsentLocation || metadata.globalConsentLocation);
2728
const iframe = document.createElement('iframe');
2829
iframe.setAttribute('style', 'width:1px;height:1px;position:absolute;left:-99px;top:-99px;');
2930
iframe.setAttribute('src', url);

0 commit comments

Comments
 (0)