README video (user-attachments) blocked by media-src CSP for signed-in users only #209976
🏷️ Discussion TypeBug BodyA video embedded in a public repository README plays for signed-out visitors, but for any signed-in account it renders as an empty 0:00 player. The browser blocks the request because the page's Content-Security-Policy is different when you are signed in. Repository: https://github.com/jo-duchan/tapflow (public) Embed (README.md, line 40): <video src="https://github.com/user-attachments/assets/dbba8bde-74b6-4fb9-bdb6-3919bc4295c4" controls width="100%"></video>Steps to reproduce
Console error (signed in, Chrome): CSP comparison
The asset URL is on Expected: signed-in users can play the video, as signed-out users can. Observed: first noticed 2026-10-10, with more than one account. It happens on every signed-in account we tried. |
Replies: 2 comments 1 reply
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Same issue on our repo. Claude Code found the cause and a fix: With a We replaced each
GitHub rewrites all of these to signed URLs, and all our README videos play again when signed in. |
Same issue on our repo. Claude Code found the cause and a fix:
With a
<video>tag, GitHub doesn't rewrite the first video in each HTML block to a signedprivate-user-images.githubusercontent.comURL. It stays ongithub.com/user-attachments/..., and the signed-in CSP blocks that.We replaced each
<video>tag with the bare attachment URL on its own line, with blank lines around it:https://github.com/user-attachments/assets/<id>GitHub rewrites all of these to signed URLs, and all our README videos play again when signed in.