Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

use window.name instead of session storage - prevents duplicate stealing session id

pythongosssssc8355ed39ff3
diff --git a/web/scripts/api.js b/web/scripts/api.js
index 2b90c2abc..d29faa5ba 100644
--- a/web/scripts/api.js
+++ b/web/scripts/api.js
@@ -35,7 +35,7 @@ class ComfyApi extends EventTarget {
}
let opened = false;
- let existingSession = sessionStorage["Comfy.SessionId"] || "";
+ let existingSession = window.name;
if (existingSession) {
existingSession = "?clientId=" + existingSession;
}
@@ -75,7 +75,7 @@ class ComfyApi extends EventTarget {
case "status":
if (msg.data.sid) {
this.clientId = msg.data.sid;
- sessionStorage["Comfy.SessionId"] = this.clientId;
+ window.name = this.clientId;
}
this.dispatchEvent(new CustomEvent("status", { detail: msg.data.status }));
break;