# Embed Perspective View as an IFRAME

**URL:** <https://forum.inductiveautomation.com/t/embed-perspective-view-as-an-iframe/46864>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 18, 2021, 10:03pm UTC](https://forum.inductiveautomation.com/t/embed-perspective-view-as-an-iframe/46864 "2021-05-18T22:03:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg.duggleby](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.duggleby/32/24352_2.png) [@greg.duggleby](https://forum.inductiveautomation.com/u/greg.duggleby)\
**Post date:** [May 18, 2021, 10:03pm UTC](https://forum.inductiveautomation.com/t/embed-perspective-view-as-an-iframe/46864/1 "2021-05-18T22:03:59Z")

</div>

I have a web application built using React.

I’m trying to embed a perspective view as an iframe in that application.

The perspective view is protected by an open id idp (auth0)

This works fine when my node webserver is running at localhost:3000 and my ignition instance is running at localhost:8088.

We’ve deployed the perspective views to an instance of ignition on a test server and now I’m trying to point the src of iframe to the test server (e.g. https ://testserver.nunya.com:8043/data/perspective/client/…). The IFRAME will display the ‘You must log in to continue’ screen and the ‘Continue to Log In’ button as expected.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/a/0a6441376903c657c84cb36a7a300dadd1ac5233.png)

After I click the ‘Continue to Log In’ button it will spin for a second or two and then take me right back to the ‘You must log in to continue’ screen.

An error message consistently appears in the console log each time I press hte ‘Continue to Log In’ button: **Error sending client activity message: TypeError: Cannot destructure property ‘readyState’ of ‘this.webSocket’ as it is undefined.**

I have updated my ignition.conf file as follows:

wrapper.java.additional.1=-Dignition.http.header.x\_frame\_options.enabled=false  
wrapper.java.additional.2=-Dignition.http.header.x\_content\_type\_options.enabled=false  
wrapper.java.additional.3=-Dignition.http.header.x\_xss\_protection.enabled=false  
wrapper.java.additional.4=-Dignition.http.header.referrer\_policy.enabled=false

Has anyone had any success embedding perspective content in an iframe of another application?

---

<div class="post-metadata">

**Author:** ![greg.duggleby](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.duggleby/32/24352_2.png) [@greg.duggleby](https://forum.inductiveautomation.com/u/greg.duggleby)\
**Post date:** [May 18, 2021, 10:35pm UTC](https://forum.inductiveautomation.com/t/embed-perspective-view-as-an-iframe/46864/2 "2021-05-18T22:35:51Z")

</div>

I have also installed the samplequickstart project on the ignition server and left it un-protected by an idp. I get a slightly different error when I embed https:///data/perspective/client/samplequickstart/ignition-101 the blue perspective loading screen appears and constantly moves from ‘Initializing client…’ to ‘Authenticating…’ to ‘Connecting…’ and then back to ‘Initializing Client’.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/6811b752aab7e3d06d76214e2b0f2a7b38a54f6d.png)

This error appears in the console:

WebSocket connection to ‘wss:///system/pws/samplequickstart/22636057?token=lzk9Jq00YShlBnUsZ7XNrapFFjutNkfwx\_gY6LwgLtg’ failed:

---

<div class="post-metadata">

**Author:** ![greg.duggleby](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.duggleby/32/24352_2.png) [@greg.duggleby](https://forum.inductiveautomation.com/u/greg.duggleby)\
**Post date:** [May 20, 2021, 9:17pm UTC](https://forum.inductiveautomation.com/t/embed-perspective-view-as-an-iframe/46864/3 "2021-05-20T21:17:37Z")

</div>

I figured this out eventually. The issue is that the two machines are on different domains and so by default they can’t exchange cookies. Because my web app was hosted on a machine on a domain named nunya.int and ignition was hosted on a domain named [nunya.com](http://nunya.com), the two pages couldn’t exchange cookies.

These settings in ignition.conf fixed the issue:  
wrapper.java.additional.5=-Dignition.http.session.cookie.same-site.enabled=true  
wrapper.java.additional.6=-Dignition.http.session.cookie.same-site.value=None

I wouldn’t recommend setting things up this way in production, but in production my web app server and my ignition server will both be on the [nunya.com](http://nunya.com) domain so I won’t have to.

---

<div class="post-metadata">

**Author:** ![kamen.kostadinov.kra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kamen.kostadinov.kra/32/7384_2.png) [@kamen.kostadinov.kra](https://forum.inductiveautomation.com/u/kamen.kostadinov.kra)\
**Post date:** [July 2, 2021, 7:59am UTC](https://forum.inductiveautomation.com/t/embed-perspective-view-as-an-iframe/46864/4 "2021-07-02T07:59:08Z")

</div>

Very useful topic! Helped me a lot! Thanks!

---

<div class="post-metadata">

**Author:** ![Hari\_GB](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@Hari\_GB](https://forum.inductiveautomation.com/u/Hari_GB)\
**Post date:** [February 6, 2024, 12:00pm UTC](https://forum.inductiveautomation.com/t/embed-perspective-view-as-an-iframe/46864/5 "2024-02-06T12:00:00Z")

</div>

Is it secured to do it, because I face similar kind of issues. I wanted to embed the perspective page into our MS teams channel and sharepoint page.
