diff --git a/src/main/webapp/js/service/websocket.js b/src/main/webapp/js/service/websocket.js index cb5395ce12ba4bd27c3ebaa21af30aacc7fcbecc..e38286e823591e301d00adf07918df532a73b909 100644 --- a/src/main/webapp/js/service/websocket.js +++ b/src/main/webapp/js/service/websocket.js @@ -1,5 +1,11 @@ define(['jQuery', 'console'], function($, logger) { - var wsUri = 'ws://localhost:8090/isochrone/websocket'; + // Static fields + var currentUrl = window.location.href, + wsUri = null; + + currentUrl = currentUrl.substring(0, currentUrl.lastIndexOf('/') + 1); + wsUri = 'ws' + currentUrl.substring(currentUrl.indexOf(':')) + 'websocket'; + /** * This class is used to communicate with the server