added relative_url_root to URL for websocket call, needed for staging server

This commit is contained in:
Ralf Teusner
2016-10-06 16:14:51 +02:00
parent d26a0fa6a4
commit 58dac37d77
2 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@ CodeOceanEditorWebsocket = {
websocket: null,
createSocketUrl: function(url) {
return '<%= DockerClient.config['ws_client_protocol'] %>' + window.location.hostname + ':' + window.location.port + url;
var rel_url_root = '<%= (defined? config.relative_url_root) && config.relative_url_root != nil && config.relative_url_root != "" ? config.relative_url_root : "" %>';
return '<%= DockerClient.config['ws_client_protocol'] %>' + window.location.hostname + ':' + rel_url_root + window.location.port + url;
},
initializeSocket: function(url) {