Skip to content
代码片段 群组 项目
提交 c8355ed3 编辑于 作者: pythongosssss's avatar pythongosssss
浏览文件

use window.name instead of session storage

- prevents duplicate stealing session id
上级 6908f9c9
No related branches found
No related tags found
无相关合并请求
......@@ -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;
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册