Fix wss support
This commit is contained in:
parent
7fe7ad27aa
commit
2d3ecc8f98
1 changed files with 6 additions and 3 deletions
|
|
@ -179,9 +179,12 @@ export class WebSocketManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wsUri = new URL(this.settings.getSettings().remoteUri);
|
const { remoteUri, vaultName } = this.settings.getSettings();
|
||||||
wsUri.protocol = wsUri.protocol === "https" ? "wss" : "ws";
|
const wsUri = new URL(remoteUri);
|
||||||
wsUri.pathname = `/vaults/${this.settings.getSettings().vaultName}/ws`;
|
wsUri.protocol = wsUri.protocol === "https:" ? "wss:" : "ws:";
|
||||||
|
wsUri.pathname = `${wsUri.pathname.replace(/\/$/u, "")}/vaults/${encodeURIComponent(vaultName)}/ws`;
|
||||||
|
wsUri.search = "";
|
||||||
|
wsUri.hash = "";
|
||||||
|
|
||||||
this.logger.info(`Connecting to WebSocket at ${wsUri.toString()}`);
|
this.logger.info(`Connecting to WebSocket at ${wsUri.toString()}`);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue