mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
add missing pathname to websocket url (#1167)
This commit is contained in:
@@ -15,7 +15,7 @@ export const useWebSocket = () => {
|
|||||||
if (websocketEnabled && websocketPingInterval) {
|
if (websocketEnabled && websocketPingInterval) {
|
||||||
const currentUrl = new URL(window.location.href)
|
const currentUrl = new URL(window.location.href)
|
||||||
const wsProtocol = currentUrl.protocol === "http:" ? "ws" : "wss"
|
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({
|
ws = new WebsocketHeartbeatJs({
|
||||||
url: wsUrl,
|
url: wsUrl,
|
||||||
|
|||||||
Reference in New Issue
Block a user