Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi all,
Sorry if my question is stupid but i don't know anything about Micro FrontEnd architecture and technology.
Do you know if it is possible to use Micro Frontend technologie to embed a thingworx application to avoid using IFrame?
Thanks for your help.
CB.
From "Help Center":
Hi VladimirN;
I think it was not my question. I don't speak about platform architecture. it is more "web" architecture. Can we embed mashups in Micro FrontEnd as we can do with iFrame ?
The context is, we have an angular Dashboard using Micro Frontend technology that gives acces to several appliquations. One of them is a TWX application and the question is, could we embed this application with the Micro frontEnd technology instead of using IFrame technogy.
Hi @cbaurand ,
I have done this in ReactJS; you can create the mashup on Thingworx. Then, create an Application Key and ensure it has the proper expiration date.
Then use the below Thingworx URL:
https://xyz.com/Thingworx/Mashups/MashupName?Parameter2=valuexyz&appKey=6b4668b0-1346-45bb-9892-f2f3d184b510&x-thingworx-session=true
Thanks,
Hi Shashi,
Thanks for your response. Do you mean, there is nothing to change in the TWX platform config like we have to do if we use IFrame ?
Is it as simple as you write ?
Thanks,
Cyril.
Hi @cbaurand ,
Yes, you need to make a CORS change in web.xml in the Apache Tomcat;
Below is the Article:
Article - CS229450 - How to Enable Cross-Origin Resource Sharing (CORS) in Apache Tomcat for ThingWorx Platform/ThingWorx Navigate (ptc.com)
Thanks,
Hi @pshashipreetham ,
Thaks for your response.
I still have a problem. I get that:
My feeling is i have to modify the content-Security_policy: frame-ancestors in the header. Currently it is set to 'self' and i think i have to add the url that embeded my application. But i'm not able to find how to do that. In the web.xml, it seems it is not possible.
Can someone help me ?