From 1845bf44fc2ad63df0115cd832c74b0fcae083b8 Mon Sep 17 00:00:00 2001 From: Julian Hundeloh <5358638+jaulz@users.noreply.github.com> Date: Fri, 5 Jul 2024 09:37:30 +0200 Subject: [PATCH] fix(core): Pass origin as referrer for `lazyLoadIntegration` (#12766) In our case the referrer is not passed to the feedback script and thus results in a 403 (because we set allowed domains in our project settings). Consequently also the modal doesn't open and it's a bit disappointing for us since we would like to use the feature. --- packages/browser/src/utils/lazyLoadIntegration.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/browser/src/utils/lazyLoadIntegration.ts b/packages/browser/src/utils/lazyLoadIntegration.ts index c09bdfa45eae..4479c2e69590 100644 --- a/packages/browser/src/utils/lazyLoadIntegration.ts +++ b/packages/browser/src/utils/lazyLoadIntegration.ts @@ -51,6 +51,7 @@ export async function lazyLoadIntegration(name: keyof typeof LazyLoadableIntegra const script = WINDOW.document.createElement('script'); script.src = url; script.crossOrigin = 'anonymous'; + script.referrerPolicy = 'origin'; const waitForLoad = new Promise((resolve, reject) => { script.addEventListener('load', () => resolve());