Some suggestions :
-
is Reverb installed on the same server ?
-
have you a firewall that could block the access ?
-
have you authenticated the user for the broadcasting ?
channelAuthorization: {
endpoint: '/api/broadcasting/auth',
headers: {
'Authorization': 'Bearer ' + sessionStorage.getItem('token'),
},
},
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api_v1.php',
commands: __DIR__.'/../routes/console.php',
channels: __DIR__.'/../routes/channels.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
// $middleware->statefulApi();
})
->withExceptions(function (Exceptions $exceptions) {
//
})
->withBroadcasting(
__DIR__.'/../routes/channels.php',
['prefix' => 'api', 'middleware' => ['api', 'auth:sanctum']],
)
->create();