Closed kharanenka closed 1 year ago
You can create a custom Guzzle client using the method described at https://github.com/pusher/pusher-http-php#custom-guzzle-client. Does this work for you?
For example: I uses Laravel 8 in my project. Laravel has simple interface for broadcasting in core class \Illuminate\Broadcasting\BroadcastManager::createPusherDriver()
$pusher = new Pusher(
$config['key'], $config['secret'],
$config['app_id'], $config['options'] ?? []
);
Laravel doesn't have possibility to pass custom object of Guzzle. I can trasfer setting to Guzzle only via $options array. I uses own local Pusher server for web-sockets for my project. Web-socket server uses self-signed SSL certificate for local development.
I can disable of SSL check in previous version on Pusher package via Laravel config (docs).
It would be cool to keep this feature for such rare cases.
The approach for this library is to pass a custom Guzzle client as mentioned. It may be that Laravel needs to add support for this if this is a wide requested feature. We aren't able to support Pusher replacement services such as laravel-websockets.
Right now new object of Guzzle is created without any parameters. For example: there is no way to disable SSL verification check. It will be useful to add the ability to set Guzzle settings from $options array.