<div dir="rtl"><div style="direction:ltr">We have a MapGuide setup where the application is hosted at: <a href="https://domain">https://domain</a><b>1</b>.com</div><div style="" dir="ltr">And the map is served from: <a href="https://domain">https://domain</a><b>2</b>.com</div><div style="" dir="ltr"><br></div><div style="" dir="ltr">When embedding the MapGuide Viewer (reactviewer) in an <iframe> on my application domain1, We get the following error in the browser console:</div><div><div style="direction:ltr">SecurityError: Failed to set a named property 'Fusion' on 'Window':</div><div style="direction:ltr">Blocked a frame with origin "<a href="https://wms.geomind.co.il">https://wms.geomind.co.il</a>" from accessing a cross-origin frame</div><div style="direction:ltr"> at t.componentDidMount (viewer-shim.tsx:1169:14)</div></div><div style="direction:ltr"><br></div><div style="" dir="ltr"><b>p.s - It works fine under AjaxViewer</b></div><div style="" dir="ltr"><br></div><div style="" dir="ltr"><p>I understand this is a browser cross-origin restriction. In my case, I cannot simply merge the domains into one, and I need a solution to allow the application to communicate with the viewer without getting blocked.</p>
<p><strong>My questions:</strong></p>
<ol>
<li>
<p>Is there a recommended way in MapGuide to handle cross-domain embedding between the application and the viewer?</p>
</li>
<li>
<p>Does mgreact have a built-in API to handle <code>postMessage</code> communication between iframe and parent, or do I need to implement a custom widget?</p>
</li>
<li>
<p>Is there any server-side configuration in MapGuide or Fusion that can bypass the <code>window.top.Fusion</code> assignment in <code>viewer-shim.tsx</code> for cross-origin cases?</p>
</li>
<li>
<p>If I have to modify <code>viewer-shim.tsx</code>, what is the best practice to keep it compatible with future MapGuide updates?</p></li></ol></div><div style="" dir="ltr"><br></div><div dir="ltr">Nimrod Cnaan<br></div><div dir="rtl" class="gmail_signature" data-smartmail="gmail_signature"><div dir="rtl"><div style="margin:0cm 0cm 0pt" dir="RTL"><font size="3"><span style="color:rgb(127,127,127);font-family:"Arial","sans-serif"" lang="HE"><font size="2">ישיר:
+97248101268 | נייד: +972525355483</font> |</span><span style="font-family:"Arial","sans-serif"" lang="HE"> <span style="color:rgb(89,89,89)"><a href="mailto:nimrod@geomind.co.il" target="_blank"><span style="color:rgb(89,89,89);font-family:"Calibri","sans-serif"" dir="LTR" lang="EN-US">nimrod@geomind.co.il</span></a></span></span></font></div><div style="margin:0cm 0cm 0pt" dir="RTL"><span dir="LTR" style="color:#1f497d"><img src="http://geomind.co.il/GeomindLogo.png" height="52" width="177"><br></span></div><p style="margin:0cm 0cm 0pt" dir="RTL"><font size="2"><span style="color:black;font-family:"Arial","sans-serif"" lang="HE">נא בקרו באתר החדש שלנו</span><span style="color:red;font-family:"Arial","sans-serif"" lang="HE"> </span><span style="font-family:"Arial","sans-serif"" lang="HE"><a href="http://geomind.co.il/" target="_blank"><span style="font-family:"Calibri","sans-serif"" dir="LTR" lang="EN-US"><font color="#0000ff">http://geomind.co.il</font></span></a></span></font></p><p align="right"><font face="Times New Roman" size="3">
</font></p></div></div></div>