G
G
grigorie19902020-02-17 22:48:52
Laravel
grigorie1990, 2020-02-17 22:48:52

How to setup laravel websocket https?

Good afternoon!
Has anyone set up Laravel websockets over https?

index.min.js:1 WebSocket connection to 'wss://gri.b220.ru:6001/app/123?protocol=7&client=js&version=5.0.3&flash=false' failed: WebSocket is closed before the connection is established.

window.Echo = new Echo({
                            broadcaster: 'pusher',
                            key: process.env.MIX_PUSHER_APP_KEY,
                            cluster: process.env.MIX_PUSHER_APP_CLUSTER,
                            wsHost: 'gri.b220.ru',
                            wsPort: 6001,
                            wssPort: 6001,
                            disableStats: true,
                            enabledTransports: ["ws", "wss"],
                        });

    'pusher' => [
            'driver' => 'pusher',
            'key' => env('PUSHER_APP_KEY'),
            'secret' => env('PUSHER_APP_SECRET'),
            'app_id' => env('PUSHER_APP_ID'),
            'options' => [
                'cluster' => env('PUSHER_APP_CLUSTER'),
                'host' => 'gri.b220.ru',
//                'host' => '127.0.0.1',
                'port' => 6001,
                'scheme' => 'https',
                'curl_options' => [
                    CURLOPT_SSL_VERIFYHOST => 0,
                    CURLOPT_SSL_VERIFYPEER => 0,
                ]
            ],
        ],

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question