Measured 22-ago-2026 against prod, on one 46 MB / 52 s clip: origin -> itself through Traefik 130 MB/s origin -> a datacenter client 838 KB/s origin -> the author's browser 90 KB/s (8.5 min for one clip) R2 S3 endpoint -> the server 11 MB/s, 206 R2 S3 endpoint -> that browser 503, every single request So the API process is not the bottleneck (it serves the file at 130 MB/s while the box sits at 0.01 MB/s of egress); the long path out of Hetzner is. And the fix for that, R2, is unreachable from a browser: *.r2.cloudflarestorage.com is an S3 endpoint, and a presigned GET that curl fetches at 11 MB/s with identical headers returns 503 to Chrome. R2_PUBLIC_BASE points presigned_get() at a custom domain bound to the bucket instead, which serves the same objects through the normal Cloudflare edge. Unset, everything keeps signing S3 URLs exactly as before, so this is inert until the domain exists. Switched at that one choke point because every caller hands the URL to a browser. The download button streamed nothing to the screen while it buffered tens of MB into a blob, which on a slow link is minutes of a button that looks dead. It now reports percentage, which needs Content-Length readable from JS, which needs the CORS middleware to name it in expose_headers. |
||
|---|---|---|
| .. | ||
| 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.