wss问题
This commit is contained in:
parent
b76f6322c8
commit
464d5a34b0
@ -45,13 +45,9 @@ export function websocketUrl() {
|
||||
}
|
||||
const location = window.location;
|
||||
const protocol = location.protocol;
|
||||
console.log(protocol);
|
||||
let wsProtocol = 'ws';
|
||||
if (protocol == 'https') {
|
||||
wsProtocol = 'wss';
|
||||
}
|
||||
const wsProtocol = protocol.replace('https:', 'wss:').replace('http:', 'ws:')
|
||||
console.log(wsProtocol);
|
||||
return `${wsProtocol}://${location.host}${WebSocketBaseUrl}`;
|
||||
return `${wsProtocol}//${location.host}${WebSocketBaseUrl}`;
|
||||
}
|
||||
|
||||
export function downloadUrl(fileId: string, isDownload?: boolean) {
|
||||
|
Loading…
Reference in New Issue
Block a user