FEATURE: Improve DFP / Ad-manager Content-Security-Policy compat (#201)

Switching to cross-domain iframes is recommended by google here: https://developers.google.com/publisher-tag/guides/content-security-policy
This commit is contained in:
David Taylor 2024-02-19 12:35:22 +00:00 committed by GitHub
parent b0c95114ea
commit 32f18893ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ function loadGoogle() {
// we always use refresh() to fetch the ads:
window.googletag.pubads().disableInitialLoad();
// Improve CSP compatibility (https://developers.google.com/publisher-tag/guides/content-security-policy)
window.googletag.pubads().setForceSafeFrame(true);
window.googletag.enableServices();
});
});