I am using Laravel websockets but Origin is going http instead of https.
Here are my files
Broadcasting.php
'connections' => [
'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'),
'encrypted' => false,
'host' => 'domainlink',
'port' => 6001,
'scheme' => 'https',
'useTLS' => true,
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
]
],
],
websockets.php
'ssl' => [
/*
* Path to local certificate file on filesystem. It must be a PEM encoded file which
* contains your certificate and private key. It can optionally contain the
* certificate chain of issuers. The private key also may be contained
* in a separate file specified by local_pk.
*/
'local_cert' => 'fullchain.pem',
/*
* Path to local private key file on filesystem in case of separate files for
* certificate (local_cert) and private key.
*/
'local_pk' =>'privkey.pem',
/*
* Passphrase for your local_cert file.
*/
'passphrase' => env('LARAVEL_WEBSOCKETS_SSL_PASSPHRASE', null),
'verify_peer' => false,
'allow_self_signed' => true,
],
app.js
window.Echo = new Echo({
broadcaster: 'pusher',
key: "L698gJH67",
encrypted: false,
wsHost: window.location.hostname,
wssHost: window.location.hostname,
wsPort: 6001,
wssPort: 6001,
forceTLS: true,
disableStats: true,
enabledTransports: ['ws', 'wss'],
});
Connection with socket is successful but while broadcasting message I am getting Invalid auth signature provided and if I change schema to http in broadcast.php I get Pusher error: cURL error 52: Empty reply from server.
Not sure what I am doing wrong. Thanks for the help in advance.