title: How to use secure websockets (wss)?
body: <p>I'm using AutobahnJS and Thruway on my website and everything works fine using a nonencrypted connection:</p>
  
  <pre><code>var connection = new autobahn.Connection({
                                               url: 'ws://www.example.com:9090',
                                               realm: 'restricted_realm'
                                           });
  
  connection.onopen = function (session) {
      alert('yay');
  };
  
  connection.open();
  </code></pre>
  
  <p>However, I am unable to use a secure connection. Changing <code>ws://www.mysite.com:9090</code> to <code>wss://www.example.com:9090</code> results in this error in the console:</p>
  
  <blockquote>
    <p>WebSocket connection to 'wss://www.example.com:9090/' failed: Error in connection establishment: net::ERR_TIMED_OUT</p>
  </blockquote>
  
  <p>I have an SSL certificate on my server and can access my site via <code>https://www.example.com</code>.</p>
  
  <p>What do I need to do to make secure websockets work?</p>