From 08c8ce0aab7bc3d41870f255061f996e1aa60476 Mon Sep 17 00:00:00 2001 From: brad stein Date: Mon, 22 Oct 2018 22:38:25 -0500 Subject: [PATCH] changed to wss for socket --- drawshare/routing.py | 2 +- drawshare/templates/drawshare/room.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drawshare/routing.py b/drawshare/routing.py index 524d4e4..1d1552a 100644 --- a/drawshare/routing.py +++ b/drawshare/routing.py @@ -4,5 +4,5 @@ from django.conf.urls import url from . import consumers websocket_urlpatterns = [ - url(r'^ws/drawshare/(?P[^/]+)/$', consumers.DrawConsumer), + url(r'^wss/drawshare/(?P[^/]+)/$', consumers.DrawConsumer), ] \ No newline at end of file diff --git a/drawshare/templates/drawshare/room.html b/drawshare/templates/drawshare/room.html index a51ee0e..562d0d4 100644 --- a/drawshare/templates/drawshare/room.html +++ b/drawshare/templates/drawshare/room.html @@ -37,8 +37,8 @@ var roomName = {{ room_name_json }}; var drawSocket = new WebSocket( - 'ws://' + window.location.host + - '/ws/drawshare/' + roomName + '/'); + 'wss://' + window.location.host + + '/wss/drawshare/' + roomName + '/'); drawSocket.onmessage = function(e) { let data = JSON.parse(e.data);