Open benben001x opened 1 year ago
pusher/pusher-php-server
v6 switched from directly using CURL to Guzzle . a4f08c0
Option 1 - Use GuzzleHttp client options
'connections' => [
// ...
'pusher' => [
// ...
- 'curl_options' => [
- CURLOPT_SSL_VERIFYHOST => 0,
- CURLOPT_SSL_VERIFYPEER => 0,
- ],
+ 'client_options' => [
+ 'verify' => false,
+ ],
],
],
Option 2 - Use a customer GuzzleHttp client
app/Http/Providers/AppServiceProvider.php
public function boot(): void
{
app(BroadcastManager::class)->extend('pusher-custom', function () {
$pusher = new Pusher(
config('broadcasting.connections.pusher.key'),
config('broadcasting.connections.pusher.secret'),
config('broadcasting.connections.pusher.app_id'),
config('broadcasting.connections.pusher.options'),
new \GuzzleHttp\Client(['verify' => false]),
);
return new PusherBroadcaster($pusher);
});
}
'connections' => [
+ 'pusher-custom' => [
+ 'driver' => 'pusher-custom'
+ ],
'pusher' => [
Refs:
Don't forget to update .env from pusher to pusher-custom
from
BROADCAST_DRIVER=pusher
to
BROADCAST_DRIVER=pusher-custom
how to set SSL disable verify host in config