# Rich onebox stopped working

**URL:** https://meta.discourse.org/t/rich-onebox-stopped-working/80366
**Category:** Support
**Tags:** onebox
**Created:** [February 12, 2018, 1:15pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366 "2018-02-12T13:15:54Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![rpasichnyk](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@rpasichnyk](https://meta.discourse.org/u/rpasichnyk)
#### Post date: [February 12, 2018, 1:15pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/1 "2018-02-12T13:15:54Z")

</div>

I noticed the onebox for my website stopped working on the discourse forum I am visiting. It was working in 1.8.x but now the forum has been updated to 1.9.3 and my oneboxes are no longer working. I checked on [try.discource.org](http://try.discource.org) and it is the same. The onebox urls look like this:

> **[Avg Speed 0kph, Distance 0.0km, Energy 1Wh](https://metr.at/r/CF1go)**
>
> https://metr.at/r/CF1go

My website returns following oembed

```plaintext
{
  "version":"1.0",
  "type":"rich",
  "width":600,
  "height":400,
  "title":"metr",
  "html":"<iframe src=\"https://metr.at/r/CF1go?oembed=true\" width=\"600\" height=\"400\"
    frameborder=\"0\"></iframe>",
  "provider_name":"metr.at",
  "provider_url":"https://metr.at"
}

```

I went through commit history in onebox github and found `407fd0b8d6d41956e2400efc1918ace255aecd37` “Security: sandbox iframes, add rel to abs anchors”

Can it be that my onebox fails because of iframe and security? Is there something I can do?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 12, 2018, 1:34pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/2 "2018-02-12T13:34:47Z")

</div>

I suspect that it is the iframe. Can you remove it?

---

<div class="post-metadata">

### Author: ![rpasichnyk](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@rpasichnyk](https://meta.discourse.org/u/rpasichnyk)
#### Post date: [February 12, 2018, 1:37pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/3 "2018-02-12T13:37:46Z")

</div>

I can not remove the iframe because the whole onebox **is** the iframe. If I remove it, there will be nothing left.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [February 12, 2018, 1:49pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/4 "2018-02-12T13:49:18Z")

</div>

> [@rpasichnyk](#):
>
> I went through commit history in onebox github and found 407fd0b8d6d41956e2400efc1918ace255aecd37 “Security: sandbox iframes, add rel to abs anchors”

Discourse 1.8 uses onebox 1.8.12 and the commit you referenced was already part of that version. So, it must be something else. If your problem is caused by changes to the onebox gem, it should be one of the 79 commits: [https://github.com/discourse/onebox/compare/e9164ee70186f87d2f2197de37a3a43f1274a060...master](https://github.com/discourse/onebox/compare/e9164ee70186f87d2f2197de37a3a43f1274a060...master)

---

<div class="post-metadata">

### Author: ![rpasichnyk](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@rpasichnyk](https://meta.discourse.org/u/rpasichnyk)
#### Post date: [February 12, 2018, 2:53pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/5 "2018-02-12T14:53:48Z")

</div>

iframely is totally happy by the way [Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed](http://iframely.com/debug?uri=https%3A%2F%2Fmetr.at%2Fr%2FCF1go)

---

<div class="post-metadata">

### Author: ![rpasichnyk](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@rpasichnyk](https://meta.discourse.org/u/rpasichnyk)
#### Post date: [February 12, 2018, 4:38pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/6 "2018-02-12T16:38:18Z")

</div>

I think I found the problem

[https://github.com/discourse/discourse/commit/d6b22e6cc1b19a5279774fbe3a0138caca7918ea](https://github.com/discourse/discourse/commit/d6b22e6cc1b19a5279774fbe3a0138caca7918ea)

do I understand right, the iframe will not be oneboxed unless whitelisted in the forum settings?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 12, 2018, 4:49pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/7 "2018-02-12T16:49:07Z")

</div>

> [@rpasichnyk](#):
>
> the iframe will not be oneboxed unless whitelisted in the forum settings?

That’s exactly right 👍

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 12, 2018, 4:52pm UTC](https://meta.discourse.org/t/rich-onebox-stopped-working/80366/8 "2018-02-12T16:52:40Z")

</div>


