diff --git a/mesa/visualization/templates/js/runcontrol.js b/mesa/visualization/templates/js/runcontrol.js index 9d312f13339..bfe3cf4ee23 100644 --- a/mesa/visualization/templates/js/runcontrol.js +++ b/mesa/visualization/templates/js/runcontrol.js @@ -131,7 +131,7 @@ resetModelButton.onclick = () => controller.reset(); /** Open the websocket connection; support TLS-specific URLs when appropriate */ const ws = new WebSocket( (window.location.protocol === "https:" ? "wss://" : "ws://") + - location.host + location.pathname.replace('/spaces','') + + location.host + location.pathname.replace('/+','') + "/ws" );