# Bug embedding twitch content on multisite

**URL:** <https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869>\
**Category:** Bug\
**Created:** [April 25, 2023, 7:47pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869 "2023-04-25T19:47:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [April 25, 2023, 7:47pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869/1 "2023-04-25T19:47:28Z")

</div>

When oneboxing a link to a Twitch video `https://www.twitch.tv/videos/xxxxx` the content refuses to load, both in Firefox and Chrome. I can reproduce this on CDCK hosting.

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/e/a/beac7b3bcdda840bd707c07b1169f04e691bedce.png)

Reason is that it uses the hostname for the multisite master instead of the hostname for the forum.

![image](https://global.discourse-cdn.com/meta/original/4X/d/1/8/d18158f19b8c4a03a72c39cb8f325701bdd6e385.png)

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [April 25, 2023, 7:55pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869/2 "2023-04-25T19:55:26Z")

</div>

Is that only for Twitch vods ?

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [April 25, 2023, 8:36pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869/3 "2023-04-25T20:36:08Z")

</div>

As far as I can see, yes.

The Twitch onebox is the only one using `#{options[:hostname]}` as well.  
Can’t find where that is being set.

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [April 28, 2023, 3:49pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869/4 "2023-04-28T15:49:11Z")

</div>

I have created a pull request to fix this issue [Fix Twitch onebox multisite issue by communiteq · Pull Request #21299 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/21299)  
(Backport to stable would be appreciated 😉 )

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [May 25, 2023, 1:11pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869/9 "2023-05-25T13:11:30Z")

</div>

@loic merged your PR, @RGJ, this is looking good now? Good to mark the bug report as resolved now?

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [May 25, 2023, 1:47pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869/10 "2023-05-25T13:47:36Z")

</div>

Yes, works like a charm! Thanks!

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [May 25, 2023, 1:53pm UTC](https://meta.discourse.org/t/bug-embedding-twitch-content-on-multisite/262869/11 "2023-05-25T13:53:58Z")

</div>


