diff --git a/web/index.html b/web/index.html
index 14d9e84c0e0..b4ff6e7d4c2 100644
--- a/web/index.html
+++ b/web/index.html
@@ -80,7 +80,8 @@
}
function startWebSocket() {
- var url = 'ws://localhost:8080/foo';
+ var docbase = window.location.href.toString();
+ var url = docbase.replace("http://","ws://");
websocket = new WebSocket(url);
websocket.onopen = function(ev) {
writeToScreen('Connected');