Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL disable verify host #23

Open
benben001x opened this issue May 26, 2023 · 3 comments
Open

SSL disable verify host #23

benben001x opened this issue May 26, 2023 · 3 comments

Comments

@benben001x
Copy link

benben001x commented May 26, 2023

how to set SSL disable verify host in config

@mtvbrianking
Copy link

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
Copy link

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

@mtvbrianking
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants