mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Diagnosed a CORS error on local development environment caused by WebTorrent fetching `.torrent` files from R2 buckets (via `xs` parameter) that do not allow localhost origin. Modified `js/webtorrent.js` to strip the `xs` parameter from magnet links when running on `localhost` or `127.0.0.1`. This prevents the browser from attempting the blocked fetch request, resolving the console error while maintaining functionality (falling back to DHT/peers). Verified using `scripts/agent/debug_frontend.py` which captures frontend console logs via Playwright. Tests run: - `npm run lint` - `npm run test:unit:shard1` - `python3 scripts/agent/debug_frontend.py` (verified error is gone) Co-authored-by: PR0M3TH3AN <[email protected]>