soketi / docs

The official soketi documentation. 📡
https://docs.soketi.app
59 stars 30 forks source link

SSL disable verify host #23

Open benben001x opened 1 year ago

benben001x commented 1 year ago

how to set SSL disable verify host in config

mtvbrianking commented 7 months 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:

noobshow commented 6 months ago

Don't forget to update .env from pusher to pusher-custom from BROADCAST_DRIVER=pusher to BROADCAST_DRIVER=pusher-custom

mtvbrianking commented 6 months ago

https://www.cloudways.com/blog/comment-system-laravel-vuejs/