Update Trusted Type loading
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
var hasLoadedThirdParty = false;
|
||||
|
||||
// Trusted Types support (for CSP `require-trusted-types-for 'script'`)
|
||||
// Clarity's tag script looks up window.trustedTypePolicies[policyName] to load its inner script;
|
||||
// we must expose the policy there for Safari (and other browsers) to avoid TT violations.
|
||||
var ttPolicy = null;
|
||||
try {
|
||||
if (
|
||||
@@ -23,6 +25,14 @@
|
||||
return url;
|
||||
},
|
||||
});
|
||||
|
||||
if (ttPolicy && !window.trustedTypePolicies) {
|
||||
window.trustedTypePolicies = {};
|
||||
}
|
||||
|
||||
if (ttPolicy) {
|
||||
window.trustedTypePolicies['mifi-ventures-policy'] = ttPolicy;
|
||||
}
|
||||
}
|
||||
} catch (_) {
|
||||
ttPolicy = null;
|
||||
|
||||
Reference in New Issue
Block a user