Revert "AAE-20808 Fixed websocket protocol (#10433)"

This reverts commit 48e9d56453b2908ab7dd1737b128aaf8b53b564c.
This commit is contained in:
VitoAlbano 2024-11-27 16:42:11 +00:00 committed by Vito Albano
parent efa4a53a36
commit a6a2dc1abc

View File

@ -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 {