We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 36455fc + c35f6f8 commit 54b2445Copy full SHA for 54b2445
src/hooks/useRoomActivity.ts
@@ -63,7 +63,10 @@ const USER_MAP_CHANGE_MSG = 'user_map';
63
* @returns {string} - The websocket host
64
*/
65
const getWebsocketHost = (providerHost: string): string => {
66
- if (providerHost === MESHERY_CLOUD_PROD) {
+ // Compare against hostnames without protocol since parsedUrl.host
67
+ // strips the protocol (e.g. "cloud.layer5.io" not "https://cloud.layer5.io")
68
+ const prodHost = new URL(MESHERY_CLOUD_PROD).host;
69
+ if (providerHost === prodHost) {
70
return MESHERY_CLOUD_WS_PROD;
71
} else if (providerHost === MESHERY_CLOUD_STAGING) {
72
return MESHERY_CLOUD_WS_STAGING;
0 commit comments