瀏覽代碼

fix socket_io_js_extra_headers

Falko Schindler 2 年之前
父節點
當前提交
5c40b8ac7c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      nicegui/templates/index.html

+ 1 - 1
nicegui/templates/index.html

@@ -89,7 +89,7 @@
         mounted() {
           const query = { client_id: "{{ client_id }}" };
           const url = window.location.protocol === 'https:' ? 'wss://' : 'ws://' + window.location.host;
-          const extraHeaders = {{ socket_io_js_extra_headers }};
+          const extraHeaders = {{ socket_io_js_extra_headers | safe }};
           window.socket = io(url, { path: "{{ prefix | safe }}/ws/socket.io", query, extraHeaders });
           window.socket.on("connect", () => {
             window.socket.emit("handshake", (ok) => {