add missing pathname to websocket url (#1167)

This commit is contained in:
Athou
2024-01-01 18:13:44 +01:00
parent bbbb9c10a6
commit d9a9a01a60

View File

@@ -15,7 +15,7 @@ export const useWebSocket = () => {
if (websocketEnabled && websocketPingInterval) {
const currentUrl = new URL(window.location.href)
const wsProtocol = currentUrl.protocol === "http:" ? "ws" : "wss"
const wsUrl = `${wsProtocol}://${currentUrl.hostname}:${currentUrl.port}/ws`
const wsUrl = `${wsProtocol}://${currentUrl.hostname}:${currentUrl.port}${currentUrl.pathname}ws`
ws = new WebsocketHeartbeatJs({
url: wsUrl,