title: Error during WebSocket handshake: Unexpected response code: 200 - Laravel Websockets
body: <p>Im trying to set up laravel websockets on a homestead SSL vagrant box</p>
  
  <p>which is <a href="https://github.com/beyondcode/laravel-websockets" rel="nofollow noreferrer">https://github.com/beyondcode/laravel-websockets</a></p>
  
  <p>Im getting the error</p>
  
  <pre><code>Error during WebSocket handshake: Unexpected response code: 200 
  
  </code></pre>
  
  <p>My pusher info is as follows</p>
  
  <pre><code>pusher' =&gt; [
              'driver' =&gt; 'pusher',
              'key' =&gt; env('PUSHER_APP_KEY'),
              'secret' =&gt; env('PUSHER_APP_SECRET'),
              'app_id' =&gt; env('PUSHER_APP_ID'),
              'options' =&gt; [
                  'cluster' =&gt; env('PUSHER_APP_CLUSTER'),
                  'encrypted' =&gt; true,
                  'host' =&gt; '127.0.0.1',
                  'port' =&gt; 6001,
                  'scheme' =&gt; 'http'
              ],
  </code></pre>
  
  <p>with my ENV:</p>
  
  <pre><code>BROADCAST_DRIVER=pusher
  PUSHER_APP_KEY=193eac85dcfd18e61e3b
  PUSHER_APP_SECRET=secret
  PUSHER_APP_ID=ID
  PUSHER_CLUSTER=eu
  </code></pre>
  
  <p>I have installed the package and started the service on my VM running
  php artisan websockets:serve</p>
  
  <p>my Bootstrap.js is:</p>
  
  <pre><code>import Echo from "laravel-echo"
  
  window.Pusher = require('pusher-js');
  
  window.Echo = new Echo({
      broadcaster: 'pusher',
      key: '193eac85dcfd18e61e3b',
      wsHost: window.location.hostname,
      wsPort: 6001,
      disableStats: true,
      enabledTransports: ['ws', 'wss']
  });
  </code></pre>
  
  <p>and im listening on like so: </p>
  
  <pre><code> window.Echo.channel("chat").listen("MessageSent", e =&gt; {
        console.log(e);
        this.messages.push(e);
      });
  </code></pre>