# Kibana in iFrame Cross-Origin

**URL:** <https://discuss.elastic.co/t/kibana-in-iframe-cross-origin/68711>\
**Category:** Kibana\
**Created:** [December 12, 2016, 12:07pm UTC](https://discuss.elastic.co/t/kibana-in-iframe-cross-origin/68711 "2016-12-12T12:07:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgaunt](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mgaunt](https://discuss.elastic.co/u/mgaunt)\
**Post date:** [December 12, 2016, 12:07pm UTC](https://discuss.elastic.co/t/kibana-in-iframe-cross-origin/68711/1 "2016-12-12T12:07:12Z")

</div>

Hello,

I am trying to embed a kibana dashboard in my webpage using an iFrame. This works flawlessly in internet explorer, but in Chrome and Firefox, I get :

Uncaught SecurityError: Blocked a frame with origin "[http://xx.xx.xxx.xxx:5601](http://xx.xx.xxx.xxx:5601)" from accessing a cross-origin frame. ([http://xx.xx.xxx.xxx:5601/bundles/kibana.bundle.js?v=10000:111675](http://xx.xx.xxx.xxx:5601/bundles/kibana.bundle.js?v=10000:111675))

In my elasticsearch.yml; http.cors.enabled is true and http.cors.allow-origin is "\*".

Does anyone have any ideas as to why this would work for IE but not in Chrome or Firefox?

Thanks!

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [December 13, 2016, 2:17pm UTC](https://discuss.elastic.co/t/kibana-in-iframe-cross-origin/68711/4 "2016-12-13T14:17:53Z")

</div>

(I deleted my previous two replies because I misread the question. Apologies for any confusion.)

What version of Kibana and Elasticsearch are you using? These will help me to try and reproduce your situation. Thanks!

---

<div class="post-metadata">

**Author:** ![mgaunt](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mgaunt](https://discuss.elastic.co/u/mgaunt)\
**Post date:** [December 13, 2016, 2:31pm UTC](https://discuss.elastic.co/t/kibana-in-iframe-cross-origin/68711/5 "2016-12-13T14:31:47Z")

</div>

Hi Shaunak,

We are using Elastic 2.4.2 and Kibana 4.5.4

We can't change from these versions because they are specified by our project specification.

Thanks.

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [December 13, 2016, 2:55pm UTC](https://discuss.elastic.co/t/kibana-in-iframe-cross-origin/68711/6 "2016-12-13T14:55:18Z")

</div>

I just tried to reproduce this setup but was unable to get the same error that you are seeing. Can you try something really simple as a test?

Can you create a simple HTML file with _just_ the Dashboard's iframe code in it? So something like this:

`<iframe src="http://xx.xx.xxx.xxx:5601/app/kibana#/dashboard/..." height="600" width="800"></iframe>`

And then navigate to that HTML page in Chrome. Do you still get the error or do you see the embedded dashboard?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 10, 2017, 2:55pm UTC](https://discuss.elastic.co/t/kibana-in-iframe-cross-origin/68711/7 "2017-01-10T14:55:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
