Explorar o código

trying to fix "non-reverse-proxy" hosting

Rodja Trappe %!s(int64=2) %!d(string=hai) anos
pai
achega
eba5792152
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      nicegui/templates/index.html

+ 1 - 1
nicegui/templates/index.html

@@ -86,7 +86,7 @@
         },
         mounted() {
           const query = { client_id: {{ client_id }} };
-          window.socket = io("{{ prefix | safe }}/ws/socket.io", query);
+          window.socket = io("{{ socket_address }}", { path: "/ws/socket.io", query });//io("{{ prefix | safe }}/ws/socket.io", { query });
           window.socket.on("update", (msg) => {
             Object.entries(msg.elements).forEach(([id, element]) => this.elements[element.id] = element);
           });