# Multiple redirects when accessing Kibana via iFrame

**URL:** <https://discuss.elastic.co/t/multiple-redirects-when-accessing-kibana-via-iframe/168024>\
**Category:** Kibana\
**Created:** [February 12, 2019, 12:03pm UTC](https://discuss.elastic.co/t/multiple-redirects-when-accessing-kibana-via-iframe/168024 "2019-02-12T12:03:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![an0nc0d3r](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@an0nc0d3r](https://discuss.elastic.co/u/an0nc0d3r)\
**Post date:** [February 12, 2019, 12:03pm UTC](https://discuss.elastic.co/t/multiple-redirects-when-accessing-kibana-via-iframe/168024/1 "2019-02-12T12:03:21Z")

</div>

I came across this comment in the [GitHub page](https://github.com/elastic/kibana/issues/10335) regarding multiple redirects...

> Usually what causes this is having multiple cookies for the same "domain" and "name", but with different values for "path". If you open the developer tools in Chrome, then click on the Application tab, then expand the Cookies section, and click on the domain, do you have multiple cookies with the name "sid"? If so, you can fix this issue by clearing all of them.

1. I am sending a pre flight authentication request (AJAX) to obtain a cookie to the `/api/security/v1/login` endpoint
2. On receipt of the cookie, I then send Set-Cookie header back to client with the kibana cookie. (I have changed the name from sid to kibana)
3. The cookie is set correctly on the client, however, when you iFrame a kibana page in (such as dashboards), you see it load in (so cookie auth looks like it's working), then does multiple redirects to [https://DOMAIN:5601/login?next=%2Fs%2FSPACE%2Fapp%2Fkibana](https://DOMAIN:5601/login?next=%2Fs%2FSPACE%2Fapp%2Fkibana)
4. I then see 'Too Many Redirects' error.
5. Any ideas as to a solution?

Thanks 🙂

**Kibana Version** : 6.5.4

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [February 19, 2019, 12:27am UTC](https://discuss.elastic.co/t/multiple-redirects-when-accessing-kibana-via-iframe/168024/2 "2019-02-19T00:27:28Z")

</div>

@Larry_Gregory

Thanks,  
Bhavya

---

<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:** [March 19, 2019, 12:27am UTC](https://discuss.elastic.co/t/multiple-redirects-when-accessing-kibana-via-iframe/168024/3 "2019-03-19T00:27:28Z")

</div>

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