diff --git a/etc/csp_whitelist.xml b/etc/csp_whitelist.xml index a0d4eb1..c4f2487 100644 --- a/etc/csp_whitelist.xml +++ b/etc/csp_whitelist.xml @@ -4,6 +4,7 @@ https://browser.sentry-cdn.com + https://cdn.lr-ingest.io diff --git a/view/frontend/templates/script/sentry.phtml b/view/frontend/templates/script/sentry.phtml index 597039a..6b8d5b1 100644 --- a/view/frontend/templates/script/sentry.phtml +++ b/view/frontend/templates/script/sentry.phtml @@ -2,6 +2,8 @@ // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis /** @var \JustBetter\Sentry\Block\SentryScript $block */ +/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ + if (!$block->canUseScriptTag($block->getNameInLayout())) { return; } @@ -26,79 +28,86 @@ $remoteFile = sprintf( ?> - +$scriptString .= "}); +}"; + +echo $secureRenderer->renderTag('script', [], $scriptString, false); +?> useLogRocket()): ?> - - - +script; +} + echo $secureRenderer->renderTag('script', [], $scriptString, false); +endif;