Hi,
I’m trying to run a django/channels/daphne websocket. I believe I’ve got the backend set up correctly - at least, it works locally.
I’m trying to connect from the front end via JS:
var voteSocket = new WebSocket('wss://' + window.location.host + '/sync/votes/');
…which gives me a 404, presumably because the URI isn’t declared in routes.yaml
If I add that route though, I get a deploy error:
routes.key: 'wss://{default}/sync/votes/' scheme is not one of http, https
And if I change the frontend JS to use a https URL, the browser complains that:
The URL’s scheme must be either ‘ws’ or ‘wss’. ‘https’ is not allowed.
So… how do I resolve that conflict? How do I declare a route that can be used as a websocket?