title: Pusher auth endpoint responded with html, how to fix this?
body: <p>I am currently using laravel 5.8 and pusher 3.0.3 and I am new to these new tech. I have created a simple chatroom but failed to listen to presence channel using <code>pusher</code>. I previously tried <code>Echo</code> but I can't find a way to debug it.</p>
  
  <p>Here is <code>pusher:subscription_error</code> from the console:</p>
  
  <pre><code>Pusher: JSON returned from webapp was invalid, yet status code was 200. Data was: &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  </code></pre>
  
  <p>I have already added this line to my <code>BroadcastServiceProvider.php</code></p>
  
  <pre><code>Broadcast::routes(['middleware' =&gt; ['auth:api']]);
  require base_path('routes/channels.php');
  </code></pre>
  
  <p>I have already receive events from pusher debugger with public channel so I think I have set my credentials correctly.</p>
  
  <p>This is the buttom part of my <code>bootstrap.js</code>.</p>
  
  <pre><code>const CSRF_TOKEN = $('meta[name="csrf-token"]').attr('content');
  
  var pusher = new Pusher('61540f91921896045e25', {
      cluster: "ap1",
      forceTLS: true,
      //authEndpoint: 'authchatuser'
      authEndpoint: '/broadcasting/auth',
      auth: {
        headers: {
          'X-CSRF-Token': CSRF_TOKEN
        }
      }
  });
  
  var channel = pusher.subscribe('presence-chatroom');
  
  //var channel = pusher.subscribe('chatroom');
  channel.bind('MessagePosted', function(data) {
     console.loga(data);
  });
  
  channel.bind('pusher:subscription_error', function(data) {
     console.log("Pusher: " + data);
  });
  </code></pre>
  
  <p>From the network tab, I couldn't see request to my pusher authEndpoint <code>broadcasting/auth</code>, but instead I see <code>GET</code> request to my homepage which responded with <code>200</code> which I think is the reason why I receive <code>html</code> instead of <code>json</code>.</p>
  
  <p>Please help me with this or do you have idea to bypass the endpoint and send json data for authentication (correct data expected by pusher) instead from my <code>web.php</code>? Thank you.</p>