Skip to content

Conversation

@Mynacol
Copy link
Contributor

@Mynacol Mynacol commented Oct 29, 2025

Unfortunately, YouTube blocks embedded views in iframes that don't send a referrer. To fix them as-is, we explicitly provide the origin.
Using strict-origin over strict-origin-when-cross-origin is the more private setting, avoiding sending unintended full-path referrers to the original origin.

A future implementation might offer a config option to either offer a YouTube video as iframe, requiring to send referrers towards Google, or provide just a link (with thumbnail), which requires no referrer, iframe or JavaScript.

https://support.google.com/youtube/answer/171780#zippy=%2Cprovide-an-http-referrer-header-to-enable-video-playback https://developers.google.com/youtube/terms/required-minimum-functionality#embedded-player-api-client-identity

@github-actions
Copy link

github-actions bot commented Oct 29, 2025

Pull request artifacts

Bridge Context Status
Anisearch 1 untitled (current) ✔️
Anisearch 1 untitled (pr) ✔️
AssociatedPressNews 1 Standard Topics (current) Bridge returned error 404! (20390)
Type: HttpException
Message: https://afs-prod.appspot.com/api/v2/feed/tag?tags=apf-topnews resulted in 404 Not Found
AssociatedPressNews 1 Standard Topics (pr) Bridge returned error 404! (20390)
Type: HttpException
Message: https://afs-prod.appspot.com/api/v2/feed/tag?tags=apf-topnews resulted in 404 Not Found
AssociatedPressNews 2 Custom Topic (current) Bridge returned error 404! (20390)
Type: HttpException
Message: https://afs-prod.appspot.com/api/v2/feed/tag?tags=europe resulted in 404 Not Found
AssociatedPressNews 2 Custom Topic (pr) Bridge returned error 404! (20390)
Type: HttpException
Message: https://afs-prod.appspot.com/api/v2/feed/tag?tags=europe resulted in 404 Not Found
Golem 1 untitled (current) ✔️
Golem 1 untitled (pr) ✔️
Heise 1 untitled (current) ✔️
Heise 1 untitled (pr) ✔️
Reuters 1 untitled (current) ✔️
Reuters 1 untitled (pr) ✔️
YouTubeCommunityTab 1 By channel ID (current) ✔️
YouTubeCommunityTab 1 By channel ID (pr) ✔️
YouTubeCommunityTab 2 By username (current) ✔️
YouTubeCommunityTab 2 By username (pr) ✔️
YouTubeFeedExpander 1 untitled (current) ✔️
YouTubeFeedExpander 1 untitled (pr) ✔️

last change: Wednesday 2025-10-29 20:03:46

Unfortunately, YouTube blocks embedded views in iframes that don't send
a referrer. To fix them as-is, we explicitly provide the origin.

A future implementation might offer a config option to either offer a
YouTube video as iframe, requiring to send referrers towards Google, or
provide just a link (with thumbnail), which requires no referrer, iframe
or JavaScript.

https://support.google.com/youtube/answer/171780#zippy=%2Cprovide-an-http-referrer-header-to-enable-video-playback
https://developers.google.com/youtube/terms/required-minimum-functionality#embedded-player-api-client-identity
@Mynacol Mynacol force-pushed the youtube-embeds-referrer branch from e91412b to 740e6b4 Compare October 29, 2025 20:03
@Mynacol Mynacol requested a review from dvikan October 29, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant