diff --git a/assets/js/app.js b/assets/js/app.js index fe4f0b3a..2ec8e4bc 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -132,7 +132,7 @@ function connectSocket() { var ws, loc = window.location; var protocol = loc.protocol == "https:" ? "wss:" : "ws:" - ws = new WebSocket(protocol + "//" + loc.hostname + (loc.port ? ":" + loc.port : "") + loc.pathname + "/ws"); + ws = new WebSocket(protocol + "//" + loc.hostname + (loc.port ? ":" + loc.port : "") + loc.pathname.replace(/\/$/, "") + "/ws"); ws.onerror = function(evt) { ws.close();