Skip to main content
1-Visitor
June 30, 2021
Question

Embed mashup in iFrame

  • June 30, 2021
  • 1 reply
  • 2053 views

Hello,

 

I want to embed in another website a mashup as iframe.

I have done the configuration like explained in the help :

https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx%2FHelp%2FComposer%2FSecurity%2FAllowingEmbeddedMashupsiniFrames.html

In the filter "ClickjackFilterWhiteList", I have added domain : http://aa.bb.fr

But it's not working...

 

With Postman, when I do a get on my url:

http://xxx/Thingworx/Mashups/TEST_VIEW?appKey=xxx&x-thingworx-session=true

I can see the headers:

Content-Security-Policy : frame-src http://aa.bb.fr

Content-Security-Policy : frame-ancestors http://aa.bb.fr

X-Frame-Options : ALLOW-FROM http://aa.bb.fr

So, I guess my config in web.xml is ok.

 

In the browser, when I enter my url :

http://xxx/Thingworx/Mashups/TEST_VIEW?appKey=xxx&x-thingworx-session=true

The page load but is redirect to url :

http://xxx/Thingworx/Runtime/index.html#mashup=TEST_VIEW&appKey=xxx&x-thingworx-session=true

I can see in the console that CSP (content-security-policy) are not set here. Just the default :

Content-Security-Policy: frame-ancestors 'self'
 
Any idea ? Thanks for help.

1 reply

Support
July 15, 2021

Hi @Ju_01

 

Here is an article that may apply to your situation.  Please check it out and let us know if you still have issues.

 

Regards.

 

--Sharon

 

 

Ju_011-VisitorAuthor
1-Visitor
July 16, 2021

Hi,

thanks for the link. We did several tests but not this one.

The project is paused but I will try to do this test later.