From a8c17618983dc1cd3f222d17c04196339970306a Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Sat, 24 Apr 2021 17:43:53 +0200 Subject: [PATCH] Fix issue with web sockets not working --- Handler/Shared.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Handler/Shared.hs b/Handler/Shared.hs index ad530ab..8a4b773 100644 --- a/Handler/Shared.hs +++ b/Handler/Shared.hs @@ -178,7 +178,10 @@ getViewProgressWithWebSocketsR jobId = do wait = document.getElementById("wait"), conn; - url = url.replace("http:", "ws:").replace("https:", "wss:"); + var anchor_name_regex = /\#.*$/; + url = url.replace("http:", "ws:").replace("https:", "wss:").replace(anchor_name_regex, "") + + conn = new WebSocket(url); conn.onmessage = function(e) {