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

This commit is contained in:
lyswhut
2026-05-23 10:56:47 +08:00
parent 96921b255f
commit b12c5ed12b
2 changed files with 5 additions and 0 deletions

View File

@@ -2,6 +2,10 @@
- 优化kw歌单列表数据显示
### 优化
- 同步服务在连接时允许URL重定向
### 修复
- 修复 kg 搜索结果显示问题(#2782

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,