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);