Open seand52 opened 10 months ago
Hello Team I want to work on this issue please assign to me
@lalitkumawat1m Do you think this is an issue with partytown? Do you have any ideas what could be happening?
Same problem with chatwoot
@mariofernandu can you create a PR with a failing test pls? With this test in place, it's easy to fix up the issue. Thanks
I saw your PR 👍 thanks
Hi,
I'm testing out a Trustpilot widget in a brand new app and I'm getting issues when it has to load the iframe. I've set up the reverse proxy from
widget.trustpilot.com
to a cloudfront distribution and it seems to work properly because it can fetch all the necessary javascript without any CORS issues.The issue comes when I load the trustpilot widget by doing
window.Trustpilot.loadFromElement(ref.current, true);
. In order for this to work I'm correctly forwardingTrustpilot.loadFromElement
.I get the error message
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://widget.trustpilot.com') does not match the recipient window's origin
.I read in the docs that iframes should work so I'm not sure if there's an issue with my implementation. Is this supposed to work or is there some issue with my implementation?
Here's a link to my implementation, it's a brand new React project and I have everything in this file https://github.com/seand52/partytown-test/blob/main/app/root.tsx#L57.
The iframe that is created seems to have my reverse proxy url as seen in the screenshot
Any help is much appreciated, thanks!