From ab0ac05de77555eb0aa7e0063cf4d9ec290a3ab4 Mon Sep 17 00:00:00 2001 From: JuanDMeGon Date: Sat, 1 Aug 2020 17:09:56 -0500 Subject: [PATCH 1/2] The encrypted property was removed on pusher-js 6 the encrypted property was removed in favor of forceTLS one, officially on pusher-js 6. --- docs/basic-usage/ssl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/basic-usage/ssl.md b/docs/basic-usage/ssl.md index a8265d8..7e700d8 100644 --- a/docs/basic-usage/ssl.md +++ b/docs/basic-usage/ssl.md @@ -49,7 +49,7 @@ php artisan websockets:serve ## Client configuration When your SSL settings are in place and working, you still need to tell Laravel Echo that it should make use of it. -You can do this by specifying the `encrypted` property in your JavaScript file, like this: +You can do this by specifying the `forceTLS` property in your JavaScript file, like this: ```js import Echo from "laravel-echo" @@ -62,7 +62,7 @@ window.Echo = new Echo({ wsHost: window.location.hostname, wsPort: 6001, disableStats: true, - encrypted: true + forceTLS: true }); ``` From 1fdcaa6a7b60e5c23d746dad2f2ac237e3d8770b Mon Sep 17 00:00:00 2001 From: JuanDMeGon Date: Sat, 1 Aug 2020 17:19:57 -0500 Subject: [PATCH 2/2] After pusher-js 6 forceTLS is default true As now since pusher-js 6 the encrypted attribute was removed in favor of forceTLS and it is true by default, so we need to use forceTLS: false, to avoid CORS issues. --- docs/basic-usage/pusher.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/basic-usage/pusher.md b/docs/basic-usage/pusher.md index e9b7a54..7c07e03 100644 --- a/docs/basic-usage/pusher.md +++ b/docs/basic-usage/pusher.md @@ -111,6 +111,7 @@ window.Echo = new Echo({ key: 'your-pusher-key', wsHost: window.location.hostname, wsPort: 6001, + forceTLS: false, disableStats: true, }); ```