10-11-2017 04:05 AM
Is there a way to set up a public browser app (so no login required) in M.App Enterprise and embed that into another web page? Can the browser app and the web page interact? Thanks
Solved! Go to Solution.
07-19-2019 02:44 AM
I am trying to solve this question as @rgoodman already described some years ago.
As shown in this Tutorial it is easy to create "public access" to a browser app with few lines of code.
I am trying to embed my browser app in another webpage via iFrame, but when I insert my URL for public access the map is not loaded in the frame.
This is my URL:
And this is the HTML iframe i want to use to embed the map in an existing webpage:
<!DOCTYPE html> <html> <body> <h2>Iframe - Target for a Link</h2> <iframe src="https://dev.mappenterprise.de/PublicAccess/dev/index.html?tenant=dev" height="100%" width="100%"></iframe> <p>When the target of a link matches the name of an iframe, the link will open in the iframe.</p> </body> </html>
There are somme errors in console:
rest.js: The main module has moved, please switch your configuration to use 'rest/browser' as the main module for browser applications.
ncaught DOMException: Blocked a frame with origin "https://dev.mappenterprise.de" from accessing a cross-origin frame. at n.__negotiateCommunication (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:400:4219) at n.__negotiateCommunication (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:400:2739) at n (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:400:3513) at https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:388:27841 at r (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:389:11273) at https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:387:23877 at F (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:387:31682) at N (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:387:31314) at C.when (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:388:2909) at w.run (https://dev.mappenterprise.de/BrowserClient/app.f191a13e5ea90f9f.js:388:1945)
POST https://dev.mappenterprise.de/jsnlog.logger 404 r.sendLogItemsAjax @ app.f191a13e5ea90f9f.js:396 i.sendBatch @ app.f191a13e5ea90f9f.js:396 i.log @ app.f191a13e5ea90f9f.js:396 e.log @ app.f191a13e5ea90f9f.js:396 e.fatalException @ app.f191a13e5ea90f9f.js:396 window.onerror.window.onerror @ app.f191a13e5ea90f9f.js:396 error (async) (anonymous) @ app.f191a13e5ea90f9f.js:396
Does somebody knows how to solve it?
07-19-2019 04:17 AM
I guess the site you are loading the MAE app into is not on the MAE server. That generates CORS issues, for security reasons the browser prevents loading scripts from a different machine. The only possibility is to enable CORS at the server side if you have control of the hosting site.
07-19-2019 04:30 AM
That's it! I did a test with my configuration ON the server and it works fine!
I will also check CORS when directing from another server!
(If I could I would accept your post as solution, but I can't)