Add server-side video streaming with HTTP Range support and an authentication cookie mechanism.
The <video> HTML element cannot send Authorization headers, which makes it difficult to stream authenticated content directly from the backend. This PR introduces a dedicated /api/video endpoint that streams files with HTTP Range support (for seeking) and uses a session cookie (video_auth) for authentication. player.html now calls /api/video/session once with the JWT to set this cookie, allowing subsequent <video> requests to /api/video/:movieId to be authenticated automatically.
Add server-side video streaming with HTTP Range support and an authentication cookie mechanism.
The `<video>` HTML element cannot send `Authorization` headers, which makes it difficult to stream authenticated content directly from the backend. This PR introduces a dedicated `/api/video` endpoint that streams files with HTTP Range support (for seeking) and uses a session cookie (`video_auth`) for authentication. `player.html` now calls `/api/video/session` once with the JWT to set this cookie, allowing subsequent `<video>` requests to `/api/video/:movieId` to be authenticated automatically.
---
<a href="https://cursor.com/background-agent?bcId=bc-9dd54d74-4906-4e11-81dd-7745cefebc2f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a> <a href="https://cursor.com/agents?id=bc-9dd54d74-4906-4e11-81dd-7745cefebc2f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a>
Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch. Learn more about Cursor Agents
Cursor Agent can help with this pull request. Just `@cursor` in comments and I'll start working on changes in this branch.
<sub>[Learn more](https://cursor.com/docs/background-agent/web-and-mobile) about Cursor Agents</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Add server-side video streaming with HTTP Range support and an authentication cookie mechanism.
The
<video>HTML element cannot sendAuthorizationheaders, which makes it difficult to stream authenticated content directly from the backend. This PR introduces a dedicated/api/videoendpoint that streams files with HTTP Range support (for seeking) and uses a session cookie (video_auth) for authentication.player.htmlnow calls/api/video/sessiononce with the JWT to set this cookie, allowing subsequent<video>requests to/api/video/:movieIdto be authenticated automatically.Cursor Agent can help with this pull request. Just
@cursorin comments and I'll start working on changes in this branch.Learn more about Cursor Agents