title: Laravel Echo with NodeJS HTTPS doesn't work
body: <p>I've been developing this NodeJS application that takes advantage of Laravel Echo's functionalities to receive information from a server through socket connection.</p>
  
  <p><strong>Server-side</strong>
  Laravel Echo Server with Laravel 5.7.19</p>
  
  <p><strong>Client-side</strong>
  "laravel-echo": "^1.5.2"
  "socket.io": "^2.2.0"</p>
  
  <pre><code>import Echo from '../../node_modules/laravel-echo/dist/echo.common.js'
  import Socketio from 'socket.io-client';
  
  let echo = new Echo({ 
  
    broadcaster: 'socket.io',
    host: 'https://smartfish.danymota.com:8080/',
    encrypted: true,
    secure: true,
    client: Socketio,
    auth: {
      headers: {
        'Authorization': 'Bearer ' + this.token.bearerToken,
      },
    },
  });
  echo.private('central.' + macAddress)
    .listen('RulesUpdated', (response) =&gt; {
      handleRules(JSON.parse(response.aquarios))
      console.log(new Date().toLocaleString() + " - Rules updated")
    })
  </code></pre>
  
  <p><strong>Problem</strong>
  Everything works fine in Http, when I switch to HTTPS it just stops working. Also, the socket connection doesn't reach the server (or at least Laravel-echo-server doesn't log it)</p>
  
  <p><strong>IMPORTANT - What I've tried</strong></p>
  
  <ol>
  <li><p>Ran the application through Browserify, and then on the browser (<strong>it works just fine on a browser, even with HTTPS</strong>)</p></li>
  <li><p>Played around with different ports (Again, it works with HTTP, so ports are likely not the problem)</p></li>
  <li><p>Changed the URL to wss://, /socket.io</p></li>
  <li><p>Forced socket.io to include a secure: true on options</p></li>
  <li><p>Changed the version of Laravel Echo</p></li>
  <li><p>Tried importing both echo.common.js and echo.js</p></li>
  </ol>
  
  <p><strong>Notes</strong></p>
  
  <p>/api/broadcasting/auth - This is working, so problem is likely not here</p>
  
  <p><strong>Laravel echo server configuration</strong> </p>
  
  <pre><code>    {
      "authHost": "https://smartfish.danymota.com",
      "authEndpoint": "/api/broadcasting/auth",
      "clients": [{
          "appId": "f7506b5e7118092c",
          "key": "9015d93999f3a2f7f95a054a76fbcbfd"
      }],
      "database": "redis",
      "databaseConfig": {
          "redis": {},
          "sqlite": {
              "databasePath1": "/database/laravel-echo-server.sqlite"
          }
      },
      "devMode": true,
      "host": null,
      "port": "8080",
      "protocol": "https",
      "socketio": {},
      "sslCertPath": "/home/danymota/ssl/cert/smartfish.danymota.com.crt",
      "sslKeyPath": "/home/danymota/ssl/private/smartfish.danymota.com.key",
      "sslCertChainPath": "",
      "sslPassphrase": "",
      "subscribers": {
          "http": true,
          "redis": true
      },
      "apiOriginAllow": {
          "allowCors": true,
          "allowOrigin": "http://smartfishweb.test/api",
          "allowMethods": "GET, POST",
          "allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
      }
  }
  </code></pre>
  
  <p><strong>Socket.io debug</strong></p>
  
  <pre><code>socket.io-client:url parse https://smartfish.danymota.com:8080/socket.io +0ms
  socket.io-client new io instance for https://smartfish.danymota.com:8080/socket.io +0ms
  socket.io-client:manager readyState closed +0ms
  socket.io-client:manager opening https://smartfish.danymota.com:8080/socket.io +0ms
  socket.io-client:manager connect attempt will timeout after 20000 +4ms
  socket.io-client:manager readyState opening +1ms
  socket.io-client:manager connect_error +60ms
  socket.io-client:manager cleanup +0ms
  </code></pre>
  
  <p>Thank you all in advance.</p>