Allowing PeerTube Video Oneboxes via Allowed Iframes Setting
The discussion revolves around enabling PeerTube video oneboxes on a Discourse instance. hellekin initially encounters an error when adding a PeerTube instance to allowed_onebox_iframes. david explains that only pre-defined domains can be used in allowed_onebox_iframes, and for other domains, allowed_iframes should be used.
hellekin shares their issue with a PeerTube video not oneboxing despite having the correct allowed_iframes entry. david suggests adding the PeerTube instance to the allowed_iframes setting, which resolves the issue in his test site.
The solution lies in adding the correct value to allowed_iframes. hellekin initially adds https://peertube.public.cat/videos/watch/, but david advises removing the /watch part, as the iframe URLs use the /embed case. Adding https://peertube.public.cat/videos to allowed_iframes solves the issue, as confirmed by hellekin.
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!
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 https://peertube.public.cat/videos/watch/392c393e-1fde-4356-bb25-8a92e7ce2057 used to show a video…