同步服务在连接时允许URL重定向
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
- 优化kw歌单列表数据显示
|
- 优化kw歌单列表数据显示
|
||||||
|
|
||||||
|
### 优化
|
||||||
|
|
||||||
|
- 同步服务在连接时允许URL重定向
|
||||||
|
|
||||||
### 修复
|
### 修复
|
||||||
|
|
||||||
- 修复 kg 搜索结果显示问题(#2782)
|
- 修复 kg 搜索结果显示问题(#2782)
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ let client: LX.Sync.Client.Socket | null
|
|||||||
// let listSyncPromise: Promise<void>
|
// let listSyncPromise: Promise<void>
|
||||||
export const connect = (urlInfo: LX.Sync.Client.UrlInfo, keyInfo: LX.Sync.ClientKeyInfo) => {
|
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))}`, {
|
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
|
}) as LX.Sync.Client.Socket
|
||||||
client.data = {
|
client.data = {
|
||||||
keyInfo,
|
keyInfo,
|
||||||
|
|||||||
Reference in New Issue
Block a user