同步服务在连接时允许URL重定向

This commit is contained in:
lyswhut
2026-05-23 11:00:21 +08:00
parent 96921b255f
commit b12c5ed12b
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -151,6 +151,7 @@ let client: LX.Sync.Client.Socket | null
// let listSyncPromise: Promise<void>
export const connect = (urlInfo: LX.Sync.Client.UrlInfo, keyInfo: LX.Sync.ClientKeyInfo) => {
client = new WebSocket(`${urlInfo.wsProtocol}//${urlInfo.hostPath}/socket?i=${encodeURIComponent(keyInfo.clientId)}&t=${encodeURIComponent(aesEncrypt(SYNC_CODE.msgConnect, keyInfo.key))}`, {
followRedirects: true,
}) as LX.Sync.Client.Socket
client.data = {
keyInfo,