From 68a3f528732b78e6fe90ca6eb12eb9dfd635bfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Dietrich?= Date: Fri, 8 Sep 2023 08:44:45 +0200 Subject: [PATCH] fix: dynamic Name routing --- client/components/Modules.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/components/Modules.vue b/client/components/Modules.vue index c677ed3..df0be80 100644 --- a/client/components/Modules.vue +++ b/client/components/Modules.vue @@ -95,8 +95,12 @@ export default { async sendMessage(subject, body, module_url) { if (this.ws === null) { const self = this; + const socket = new WebSocket( - "ws://localhost:8000/data/wss/" + + (document.location.protocol === "http:" ? "ws" : "wss") + + "://" + + document.location.host + + "/data/wss/" + this.$store.state.class_.id + "/" + this.username