fix(*): 客户端标识 - 兼容 HTTP 内网访问并修复创造页卡死

Fixes #86
This commit is contained in:
ddCat
2026-08-03 15:06:09 +08:00
parent 72420895b2
commit d3b044e009
9 changed files with 35 additions and 9 deletions

6
web/src/lib/client-id.ts Normal file
View File

@@ -0,0 +1,6 @@
import { nanoid } from "nanoid";
export function createClientId() {
// randomUUID 在 HTTP 内网地址下不可用;nanoid 依赖仍可用的 getRandomValues。
return nanoid();
}