浏览代码

trying to fix "non-reverse-proxy" hosting

Rodja Trappe 2 年之前
父节点
当前提交
eba5792152
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
           });