Allowing peertube video oneboxes via the allowed iframes setting

Continuing the discussion from Peertube embedding?:

Trying to add a PeerTube instance to the allowed_onebox_iframes I get the following error: invalid choice. Hmm, what? How to solve this?

Tip / Caveat for embedding Peertube videos

Use https://peertube.instance.example/videos in the allowed_iframes site setting to support both cases of /videos/watch/<uuid> and /videos/embed/<uuid>, the latter being used by the peertube onebox when you paste the former!

In the “allowed onebox iframes” list, you can only pick from pre-defined domains which are provided by the onebox gem.

If you want to allow iframes from other domains, use the “allowed iframes” setting

1 Like

Ack, thank you.

I was trying to onebox a video from Peertube. It used to work just by pasting the link, and I do have the correct allowed_iframes entry. I’m a bit lost with recent changes with CSP that seem to break on new instances but not old ones.

Like, this link used to show a video…

It works on my test site once I add it to the allowed iframes setting:

What value are you adding to allowed_iframes?

1 Like

Ah, remove the /watch from the end and it should work. The iframe URLs look like

I added this value to my settings:

You rock! I did not think about the embed case.


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