<script>
  // Expose the main RVT namespace.
  this.RVT || (this.RVT = {});

  RVT.config = {
    terminal: {
      theme: <%= raw RVT.config.style.colors.to_json %>
    },

    transport: {
      url: {
        input: "<%= rvt.input_console_session_path(@console_session) %>",
        pendingOutput: "<%= rvt.pending_output_console_session_path(@console_session) %>",
        configuration: "<%= rvt.configuration_console_session_path(@console_session) %>"
      },

      uid: "<%= @console_session.uid %>"
    }
  };
</script>

<div id="terminal"></div>

<%= javascript_tag nonce: true do %>
  // Expose the main RVT namespace.
  this.RVT || (this.RVT = {});

  RVT.config = {
    terminal: {
      theme: <%= raw RVT.config.style.colors.to_json %>
    },

    transport: {
      url: {
        input: "<%= rvt.input_console_session_path(@console_session) %>",
        pendingOutput: "<%= rvt.pending_output_console_session_path(@console_session) %>",
        configuration: "<%= rvt.configuration_console_session_path(@console_session) %>"
      },

      uid: "<%= @console_session.uid %>"
    }
  };
<% end %>

<div id="terminal"></div>

Add nonce: true for CSP friendly environments
Add nonce: true for CSP friendly environments
