laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
1.05k stars 76 forks source link

Laravel reverb config tls variables #105

Closed vatsake closed 5 months ago

vatsake commented 5 months ago

In my dev I'm using a self signed certificate, so I have to put the cert path in .env. In my production there's a nginx reverse proxy, so I don't need a certificate in my .env.

But the problem is if the options "tls" is NOT empty then the server will run in secure mode.

Servers/Reverb/Factory.php L54

$uri = empty($options['tls']) ? "{$host}:{$port}" : "tls://{$host}:{$port}";

My reverb.php config

'servers' => [
        'reverb' => [
           ...
            'options' => [
                'tls' => [ //tls is ALWAYS not empty
                    'local_cert' =>env('REVERB_CERT')
                ],
            ],
        ]
]
joedixon commented 5 months ago

Thanks, I'll get a fix up for this as soon as I can.

joedixon commented 5 months ago

This should be resolved in the next release: https://github.com/laravel/reverb/pull/85