I'm trying to implement a local network-accessible laravel app with websocket.
Everything works well on http, now we need to upgrade to https to allow the app on windows desktop notification.
I made a self-signed certificate using openssl command I found on the net.
I manage to make the app work on https but not its websocket. I did every instructions in the laravel websocket documentation but no to avail.
Server setup: Windows+XAMPP
broadcasting.php
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'host' => 'lqs.miso',
'port' => 6001,
'scheme' => 'https'
],
],
bootstrap.js
import Echo from "laravel-echo"
window.Pusher = require('pusher-js');
window.Echo = new Echo({
broadcaster: 'pusher',
key: 'ABCDEFG',
wsHost: window.location.hostname,
wsPort: 6001,
wssPort: 6001,
forceTLS: true,
disableStats: true,
enabledTransports: ['ws', 'wss']
});
.env
LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT="C:/xampp/crt/lqs.miso/server.crt"
LARAVEL_WEBSOCKETS_SSL_LOCAL_PK="C:/xampp/crt/lqs.miso/server.key"
I also set 127.0.0.1
to lqs.miso
on system32
I'm getting connection failed with no other hints of error.