0.3.5 共享功能修复

This commit is contained in:
liaibo
2026-01-24 12:32:51 +08:00
parent 25923f308c
commit 3c3f407f4b
44 changed files with 3754 additions and 420 deletions
@@ -54,9 +54,13 @@ export function ConvexClientProvider({ children }: ConvexClientProviderProps) {
}
// 未配置 env:使用当前主机名,端口固定 3210,并跟随当前页面协议(http/https)。
// https 场景下浏览器禁止 ws://,因此默认走同源反代 `/convex`(需要 server 支持 Upgrade 透传)。
if (browserProtocol === "https:") {
return normalize(`${window.location.origin}${convexProxyPath}`);
}
const hostname = window.location.hostname;
const protocol = "http:";
return normalize(`${protocol}//${hostname}:3210`);
return normalize(`http://${hostname}:3210`);
};
const convexUrl = getConvexUrl();