瀏覽代碼

allow detection of reconnect-check

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

+ 1 - 1
nicegui/templates/index.html

@@ -234,7 +234,7 @@
           });
           window.socket.on("try_reconnect", () => {
             const checkAndReload = async () => {
-              await fetch(window.location.href);
+              await fetch(window.location.href, { headers: { 'NiceGUI-Check': 'try_reconnect' }, });
               window.location.reload();
             };
             setInterval(checkAndReload, 500);