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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Embed Thingworx application in a Micro FrontEnd architecture

cbaurand
12-Amethyst

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
cbaurand
12-Amethyst
(To:VladimirN)

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,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.

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,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.

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 ?

Announcements


Top Tags