GET /api/source streams the file we downloaded, not a derived clip, and it was open on the reasoning that the UUID job id is the capability. That makes the product a public YouTube downloader wearing a UUID, which is the characterisation worth avoiding, and one leaked id in a log or a referer opens someone else's video. A <video src> cannot carry an Authorization header, which is why it was open in the first place, so the owner mints a short-lived signed URL from /api/source-url and hands the player that. The endpoint takes the signature or falls back to the owner check. Self-host and ownerless BYOK jobs are untouched: no owner to check, no secret to sign with. The owner lookup is gated on BILLING_ENABLED because it falls through to a full rescan of the output directory, which off billing would run on every preview and buy nothing. Both minters go through _signed_source_url. The EDL feeds ClipEditor's source monitor the same way and was built as a bare path, which works in self-host and in every test and 404s in cloud. The regression test asserts the endpoint calls the minter rather than comparing strings: off billing the helper returns that same bare path, so a string comparison passes just as happily with the bug in. Verified by putting the bug back and watching it fail. The frontend mints at render, not when the session is persisted, or localStorage would hold a token that expired overnight. SOURCE_RETENTION_SECONDS can age the retained download out ahead of the clips it produced, and defaults to the job clock, so nothing changes until someone sets it. Lowering it is not free: the EDL, rerender, scenes and reframe endpoints all read that file and answer 409 once it is gone. Claude-Session: https://claude.ai/code/session_01WyFE2wXi8quZR6nLRRLDgE |
||
|---|---|---|
| .. | ||
| public | ||
| seo | ||
| src | ||
| .gitignore | ||
| Dockerfile | ||
| eslint.config.js | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| vite-plugin-seo.js | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.