merge
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* webVRender (SimpleLite 3D 视口, 默认 :8223) 的 host 解析。
|
||||
*
|
||||
* 优先级:显式 VITE_VRENDER_HOST > 当前页面 hostname:8223。
|
||||
* 不能写死 localhost —— 从远程浏览器访问平台时 iframe 会去连访问者本机而非服务器。
|
||||
*/
|
||||
export function defaultVrHost(): string {
|
||||
const env = import.meta.env.VITE_VRENDER_HOST as string | undefined
|
||||
if (env && env.trim()) return env.trim()
|
||||
return `${window.location.hostname}:8223`
|
||||
}
|
||||
Reference in New Issue
Block a user