allow different action cable host

This commit is contained in:
Zachary Chai
2017-02-16 10:29:08 -05:00
parent 82df7d209a
commit 74f1f4c071
4 changed files with 23 additions and 17 deletions

View File

@ -18,7 +18,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<head>
<title>Greenlight</title>
<%= csrf_meta_tags %>
<meta name="action-cable-url" content="<%= relative_root+Rails.configuration.action_cable.mount_path %>"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<% if relative_root != '/b' %>
@ -26,6 +26,20 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<% else %>
<%= stylesheet_link_tag 'fa/gl-fa', media: 'all', 'data-turbolinks-track': 'reload' %>
<% end %>
<!-- Global javascript variables and helpers -->
<script type="text/javascript">
window.I18n = <%= client_translations.to_json.html_safe %>
window.GreenLight = {};
window.GreenLight.WEBSOCKET_HOST = "<%= ENV['WEBSOCKET_HOST'] %>"
window.GreenLight.RELATIVE_ROOT = "<%= relative_root %>"
window.GreenLight.META_LISTED = "<%= BbbApi::META_LISTED %>";
window.GreenLight.META_TOKEN = "<%= BbbApi::META_TOKEN %>";
window.GreenLight.META_HOOK_URL = "<%= BbbApi::META_HOOK_URL %>";
window.GreenLight.user = {};
window.GreenLight.user.roomOwner = <%= is_room_owner %>;
</script>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
@ -54,15 +68,3 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<!-- End of Footer -->
</body>
</html>
<!-- Global javascript variables and helpers -->
<script type="text/javascript">
window.I18n = <%= client_translations.to_json.html_safe %>
window.GreenLight = {};
window.GreenLight.relative_root = "<%= relative_root %>"
window.GreenLight.META_LISTED = "<%= BbbApi::META_LISTED %>";
window.GreenLight.META_TOKEN = "<%= BbbApi::META_TOKEN %>";
window.GreenLight.META_HOOK_URL = "<%= BbbApi::META_HOOK_URL %>";
window.GreenLight.user = {};
window.GreenLight.user.roomOwner = <%= is_room_owner %>;
</script>