diff --git a/chat/templates/chat/chat_content.html b/chat/templates/chat/chat_content.html index c4549b8..51ba63a 100644 --- a/chat/templates/chat/chat_content.html +++ b/chat/templates/chat/chat_content.html @@ -121,10 +121,10 @@ $(document).ready(function(){ ws_string = 'ws://' } if(typeof chatwebsocket != "undefined"){ - chatwebsocket = new WebSocket(ws_string+window.location.host+"/chat/{{roomdata.creator.pk}}/{{roomdata.chatmember_single.pk}}/") + chatwebsocket = new WebSocket(ws_string+window.location.host+"/ws/chat/{{roomdata.creator.pk}}/{{roomdata.chatmember_single.pk}}/") } else{ - chatwebsocket = new WebSocket(ws_string+window.location.host+"/chat/{{roomdata.creator.pk}}/{{roomdata.chatmember_single.pk}}/") + chatwebsocket = new WebSocket(ws_string+window.location.host+"/ws/chat/{{roomdata.creator.pk}}/{{roomdata.chatmember_single.pk}}/") } diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 139f657..27091d9 100644 Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ diff --git a/digitaleagentur/settings.py b/digitaleagentur/settings.py index e03b6dd..c674a0f 100644 --- a/digitaleagentur/settings.py +++ b/digitaleagentur/settings.py @@ -60,7 +60,7 @@ X_FRAME_OPTIONS = 'SAMEORIGIN' # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '_qv2t2lmsctjxpbb4rrp=op%_20_hxzonv^mvty1o85c)l$s^q' -ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', '127.0.0.1', 'dev01.digitale-agentur.com', '10.0.2.2'] +ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', '127.0.0.1', 'localhost', 'dev01.digitale-agentur.com', '10.0.2.2'] # Application definition INSTALLED_APPS = [ diff --git a/users/routing.py b/users/routing.py index f5bf447..522be67 100644 --- a/users/routing.py +++ b/users/routing.py @@ -3,6 +3,6 @@ from django.urls import re_path from . import mainwebsocket websocket_urlpatterns = [ - re_path(r'chat/(?P\w+)/(?P\w+)/$', mainwebsocket.UsersChat), - re_path('main/', mainwebsocket.UsersConsumer), + re_path(r'ws/chat/(?P\w+)/(?P\w+)/$', mainwebsocket.UsersChat), + re_path('ws/', mainwebsocket.UsersConsumer), ] \ No newline at end of file diff --git a/users/templates/users/base.html b/users/templates/users/base.html index f2efde7..7db6a2d 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -659,7 +659,7 @@ $(document).ready(function(){ ws_string = 'ws://' } - const mainwebsocket = new WebSocket(ws_string+window.location.host+"/main/") + const mainwebsocket = new WebSocket(ws_string+window.location.host+"/ws/") mainwebsocket.onmessage = function(e) { if(e["data"] != "presence_update")