AAE-20808 Fixed websocket protocol (#10433)

* AAE-20808 Fixed websocket protocol

* AAE-20808 Removed comments
This commit is contained in:
Ehsan Rezaei
2024-11-26 21:47:17 +01:00
committed by GitHub
parent 2d3c6841f0
commit 48e9d56453

View File

@@ -91,7 +91,8 @@ export class WebSocketService {
private createWsUrl(serviceUrl: string): string { private createWsUrl(serviceUrl: string): string {
const url = new URL(serviceUrl, this.host); const url = new URL(serviceUrl, this.host);
url.protocol = url.protocol === 'https' ? 'wss' : 'ws'; const protocol = url.protocol === 'https:' ? 'wss:' : 'ws:';
url.protocol = protocol;
return url.href; return url.href;
} }