diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js
index 85c0230b..2d1696df 100644
--- a/app/assets/javascripts/cable.js
+++ b/app/assets/javascripts/cable.js
@@ -22,8 +22,13 @@
//= require_tree ./channels
(function() {
+ var protocol = window.location.protocol === "https:" ? "wss://" : "ws://";
+ var host = window.GreenLight.WEBSOCKET_HOST || window.location.host + window.GreenLight.RELATIVE_ROOT;
+ var path = window.GreenLight.WEBSOCKET_PATH || '/cable';
+ var url = protocol + host + path;
+
this.App || (this.App = {});
- App.cable = ActionCable.createConsumer();
+ App.cable = ActionCable.createConsumer(url);
}).call(this);
diff --git a/app/assets/javascripts/meeting.coffee b/app/assets/javascripts/meeting.coffee
index c79ea908..7cbfd321 100644
--- a/app/assets/javascripts/meeting.coffee
+++ b/app/assets/javascripts/meeting.coffee
@@ -47,8 +47,8 @@ class @Meeting
url = location.protocol + '//' + location.hostname
if location.port
url += ':' + location.port
- if GreenLight.relative_root
- url += GreenLight.relative_root
+ if GreenLight.RELATIVE_ROOT
+ url += GreenLight.RELATIVE_ROOT
return url
# Sends the end meeting request
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 81d924e7..d7584fce 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -18,7 +18,7 @@ with BigBlueButton; if not, see