Rewrite file syncing #202

Open
andras wants to merge 48 commits from asch/fix-again into main
Showing only changes of commit 2d3ecc8f98 - Show all commits

Fix wss support

Andras Schmelczer 2026-09-19 22:17:19 +01:00

View file

@ -179,9 +179,12 @@ export class WebSocketManager {
}
}
const wsUri = new URL(this.settings.getSettings().remoteUri);
wsUri.protocol = wsUri.protocol === "https" ? "wss" : "ws";
wsUri.pathname = `/vaults/${this.settings.getSettings().vaultName}/ws`;
const { remoteUri, vaultName } = this.settings.getSettings();
const wsUri = new URL(remoteUri);
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()}`);