Bug-websocket connection not routed correction in docker app


I’ve isolated a bug or problem with how a docker app can (not) use websockets. The error is probably being printed from nginx (according to my smart friend).

Example Error in LogStream:

('', 48389) - "WebSocket /" 403

Reproduction Steps:

  1. Create a free/paid docker app
  2. Set the repo slug to zackees/webtorrent-seeder-websocket-bug
  3. Check that logs, to see that the webtorrent seeder runs, you’ll see a printout for the magnetURI, which will always be this: magnet:?xt=urn:btih:94993a31534e1a8466230e27be4ab1a5767eb8b5&dn=beavis_and_butthead.mp4&tr=wss%3A%2F%2Fwebtorrent-tracker.onrender.com
  4. Once the upload is finished, a webtorrent seed will be started, which will signal to the tracker that it is ready to serve the video. The swarm will be notified and you can check whether you can now download video by clicking here.
  5. If everything works correctly then the beavis and butthead clip should load.
  6. To debug the stream (a bit more) try out the webtorrent file checker

This is what it will look like if everything plays correctly.

I’ve spent all day on this. I can confirm this is websocket error happens also with DigitalOcean.

As a reminder, this codebase works fine on my local docker, when I instantiate it through docker-compose up