Skip to content

Lightbox: data-preview-link="youtube embed URL" results in YouTube denying access (X-Frame-Options) #3854

@jmuheim

Description

@jmuheim

I try to display a YouTube embed URL in a lightbox. This results in the following:

Refused to display 'https://www.youtube.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Image

What I find interesting is that data-preview-link="https://youtu.be/embed/U1t-LzSyH4Y" (youtu.be), while the console complains about https://www.youtube.com/ (www.youtube.com) refusing to connect:

Image

When rendering a YouTube <iframe> myself, there doesn't seem to be a problem:

Image

So it seems that the Reveal.js mechanism misses something necessary when creating the <iframe> by itself, so that YouTube is not satisfied with it and refuses any connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions