# Embed bonita page in an iframe

**URL:** <https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404>\
**Category:** Q&A\
**Created:** [10 April 2014 10:48 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404 "2014-04-10T10:48:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![henriqg](https://avatars.discourse-cdn.com/v4/letter/h/f475e1/32.png) [@henriqg](https://community.ofelia.com/u/henriqg)\
**Post date:** [10 April 2014 10:48 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404/1 "2014-04-10T10:48:51Z")

</div>

I’m trying to embed a bonita workflow in an iFrame but the server is refusing because X-Frame-Options is set to ‘SAMEORIGIN’.

I’ve developed a custom frontend that incorporates bonita flow in an iframe. They are running on the same host but the port is different (:5000 and :8080).

The X-Frame-Options was not a problem when developing and launching bonita process through bonita studio but, I’m trying now to deploy it in JBoss (I’m using JBoss bundle provided by bonitasoft) and I’m getting this error.

I’ve tried to add the header in JBoss but it only got worst because of a duplicate header and the browser falls back to ‘DENY’.

Can anyone tell me where is this header set and to override / delete it?

Also thought of using nginx to override this request but I don’t know if is possible.

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [15 April 2014 14:34 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404/2 "2014-04-15T14:34:29Z")

</div>

Hi henriqg,

This behaviour is due to new security enforcement implementations that we are putting in place in our product.  
For instance, the X-Frame-Options is set to SAMEORIGIN in order to avoid clickjaking attacks.  
There is a way to deactivate this check, it is in the web.xml file in where we specify all our filters.

**Be careful:** by deactivating this filter you will also loose three more security HTTP headers: X-XSS-Protection, X-WebKit-CSP, X-Content-Type-Options ( each of them related to a specific security threat ).

For a jbos bundle you can find it under \*server\default\deploy\bonita-all-in-one-6.3.0-SNAPSHOT.ear\bonita.war\WEB-INF\*  
And it is enough to comment-out the section:  
  
  
SecurityFilter  
…  
  
  
Re-start the bundle and it will work.

Let us know if it is ok and keep in mind that you will certainly be more exposed to certain kind of web threats.

UPDATE: as well noticed by henriqg, it is important to comment-out also the filter mapping part:  
  
  
SecurityFilter  
/portal/homepage  
/login.jsp  
  
  
Cheers

---

<div class="post-metadata">

**Author:** ![henriqg](https://avatars.discourse-cdn.com/v4/letter/h/f475e1/32.png) [@henriqg](https://community.ofelia.com/u/henriqg)\
**Post date:** [16 April 2014 16:57 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404/3 "2014-04-16T16:57:40Z")

</div>

Hi,

Yup, that did the trick. That filter also appeared in other place in web.xml ( /login ) and had to comment it also.  
I understand the security issue involved in doing this but it will be run in-house and, in prod environment, bonita will be in the same host / port so… This is just for testing 🙂

Thank you

---

<div class="post-metadata">

**Author:** ![jack.a.rider](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jack.a.rider](https://community.ofelia.com/u/jack.a.rider)\
**Post date:** [26 May 2014 10:33 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404/4 "2014-05-26T10:33:43Z")

</div>

Thanks, this save my day.

---

<div class="post-metadata">

**Author:** ![rmorrise](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@rmorrise](https://community.ofelia.com/u/rmorrise)\
**Post date:** [9 December 2014 21:13 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404/5 "2014-12-09T21:13:50Z")

</div>

Fabio,

Thanks for this answer. Is it possible to add an enhancement to make the X-Frame-Options header customizable so that we don’t lose the other functionality that you mentioned here? We would like to be able to use an ALLOW-FROM value for this header. Currently, it looks like we will need a rule to modify the response header in a proxying server if we want this behavior.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [10 December 2014 11:00 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404/6 "2014-12-10T11:00:29Z")

</div>

Hi rmorrise,

Thanks for your suggestion and I can confirm you that it is a point that we have already discussed internally. We will try to improve the filter according to our priorities.  
Stay tuned.

---

<div class="post-metadata">

**Author:** ![ansoumana.cisse](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@ansoumana.cisse](https://community.ofelia.com/u/ansoumana.cisse)\
**Post date:** [21 July 2015 14:58 UTC](https://community.ofelia.com/t/embed-bonita-page-in-an-iframe/4404/7 "2015-07-21T14:58:59Z")

</div>

Hi ,  
am trying to persist my custum page on bonita portail. but when i stop my bonita engine i lost all the custom profiles which i had create. how can i resolve this issues?  
cheers
