cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Embed Thingworx application in a Micro FrontEnd architecture

cbaurand
11-Garnet

Embed Thingworx application in a Micro FrontEnd architecture

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.

 

6 REPLIES 6

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,

Shashi Preetham

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;

pshashipreetham_0-1717247559741.png

 

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,

Shashi Preetham

Hi @pshashipreetham ,
Thaks for your response.
I still have a problem. I get that:

cbaurand_0-1720082092646.png

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 ?

Top Tags