https://hear-me.social/@codewizard/116546338265386095

This is the link of a Mastodon post. If you open the link, you come across youtube links which play when the button is clicked. But youtube videos aren’t playing in Piefed.

What’s the problem with Piefed ??🤔🤔

  • INeedMana@piefed.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    Could you point me in the direction what change was needed to make it work? Was it CSP?

    • Jerry on PieFed@feddit.online
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 months ago

      YouTube requires a valid Referer header to allow embedded playback, and if Nginx is stripping it out, like mine did, the videos throw an error and refuse to play.

      I fixed this by updating the referrer-Policy header. I updated the server {} block with this:

      add_header Referrer-Policy "strict-origin-when-cross-origin" always;