勉强修复了客户端协议拿不到 http url 的问题

* 后患
This commit is contained in:
CrescentLeaf
2025-12-14 00:38:14 +08:00
parent 75dfced90f
commit 484a5efb99

View File

@@ -186,7 +186,7 @@ export default class LingChairClient {
throw new CallbackError(re) throw new CallbackError(re)
} }
getBaseHttpUrl() { getBaseHttpUrl() {
const url = new URL(this.server_url) const url = new URL(this.client.io.opts.host || (this.server_url == '' ? `${window.location.protocol}//${window.location.host}` : this.server_url))
return (({ return (({
'ws:': 'http:', 'ws:': 'http:',
'wss:': 'https:', 'wss:': 'https:',