From a6a2dc1abcc80c0446ee1c60ef3fb186536dcfcd Mon Sep 17 00:00:00 2001 From: VitoAlbano Date: Wed, 27 Nov 2024 16:42:11 +0000 Subject: [PATCH] Revert "AAE-20808 Fixed websocket protocol (#10433)" This reverts commit 48e9d56453b2908ab7dd1737b128aaf8b53b564c. --- .../src/lib/services/web-socket.service.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/process-services-cloud/src/lib/services/web-socket.service.ts b/lib/process-services-cloud/src/lib/services/web-socket.service.ts index 9a03e4d5e4..db04111187 100644 --- a/lib/process-services-cloud/src/lib/services/web-socket.service.ts +++ b/lib/process-services-cloud/src/lib/services/web-socket.service.ts @@ -95,13 +95,9 @@ export class WebSocketService extends BaseCloudService { private createWsUrl(apolloClientName: string, serviceUrl: string): string { const url = new URL(serviceUrl, this.host); - const protocol2 = url.protocol === 'https:' ? 'wss:' : 'ws:'; - url.protocol = protocol2; - const protocol = this.host.split('://')[0] === 'https' ? 'wss' : 'ws'; - const subHost = this.host.split('://')[1]; - const finalUrl = `${protocol}://${subHost}/${apolloClientName}/notifications`; - this.logger.error(`WebSocketService: createWsUrl: ${finalUrl}`); - return finalUrl; + url.protocol = url.protocol === 'https' ? 'wss' : 'ws'; + + return url.href; } private createHttpUrl(serviceUrl: string): string {