From d1acf51ffbfd5dbc5d6efbf5cd7a2618b50ae0c5 Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Thu, 28 Nov 2019 19:08:06 +0000 Subject: [PATCH] Fix #58: Allow Pusher Host To Be Set In Env (#59) --- .env.example | 1 + .env.travis | 1 + config/broadcasting.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index fba114743..a4803eb9a 100644 --- a/.env.example +++ b/.env.example @@ -36,6 +36,7 @@ BROADCAST_DRIVER=pusher PUSHER_APP_KEY=ukcpwebsocket PUSHER_APP_SECRET=ukcpsecret PUSHER_APP_ID=ukcpwebsocket +WEBSOCKET_BROADCAST_HOST=127.0.0.1 WEBSOCKET_CERT_PATH= WEBSOCKET_PRIVATE_KEY_PATH= WEBSOCKET_CERT_PASSPHRASE= diff --git a/.env.travis b/.env.travis index e3528e6a5..9b247cb19 100644 --- a/.env.travis +++ b/.env.travis @@ -31,6 +31,7 @@ BROADCAST_DRIVER=pusher PUSHER_APP_KEY=ukcpwebsocket PUSHER_APP_SECRET=ukcpsecret PUSHER_APP_ID=ukcpwebsocket +WEBSOCKET_BROADCAST_HOST=127.0.0.1 WEBSOCKET_CERT_PATH= WEBSOCKET_PRIVATE_KEY_PATH= WEBSOCKET_CERT_PASSPHRASE= diff --git a/config/broadcasting.php b/config/broadcasting.php index cba4254f3..b0cd69297 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -21,7 +21,7 @@ 'options' => [ 'cluster' => env('PUSHER_APP_CLUSTER'), 'encrypted' => true, - 'host' => '127.0.0.1', + 'host' => env('WEBSOCKET_BROADCAST_HOST') ?? '127.0.0.1', 'port' => 6001, 'scheme' => env('APP_ENV') !== 'local' ? 'https' : 'http' ],