Update broadcasting configuration in .env.example and broadcasting.php: replace REVERB_* variables with REVERB_BROADCAST_* for clarity, ensuring proper local and production settings for websocket connections.
This commit is contained in:
1 parent
87bc7d9591
commit
5a9ba0cc23
2 files changed
+12
-9
No files matched your search
+8
-5
@@ -51,7 +51,8 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
|
|||||||
CHAT_SUPPORT_USER_ID=
|
CHAT_SUPPORT_USER_ID=
|
||||||
|
|
||||||
# Laravel Reverb (`php artisan reverb:start` / supervisor).
|
# Laravel Reverb (`php artisan reverb:start` / supervisor).
|
||||||
# PHP broadcasts to this host. Browsers use nginx at wss://mm.com.tm/app.
|
# PHP publishes events to 127.0.0.1:8080 (REVERB_BROADCAST_* / SERVER_PORT).
|
||||||
|
# Browsers use nginx at wss://mm.com.tm/app (VITE_REVERB_*).
|
||||||
# Local:
|
# Local:
|
||||||
REVERB_APP_ID=
|
REVERB_APP_ID=
|
||||||
REVERB_APP_KEY=
|
REVERB_APP_KEY=
|
||||||
@@ -61,10 +62,12 @@ REVERB_PORT=8080
|
|||||||
REVERB_SCHEME=http
|
REVERB_SCHEME=http
|
||||||
REVERB_SERVER_HOST=0.0.0.0
|
REVERB_SERVER_HOST=0.0.0.0
|
||||||
REVERB_SERVER_PORT=8080
|
REVERB_SERVER_PORT=8080
|
||||||
# Production (keep SERVER_* on 8080; PHP can still use 127.0.0.1:8080):
|
REVERB_BROADCAST_HOST=127.0.0.1
|
||||||
# REVERB_HOST=127.0.0.1
|
REVERB_BROADCAST_PORT=8080
|
||||||
# REVERB_PORT=8080
|
REVERB_BROADCAST_SCHEME=http
|
||||||
# REVERB_SCHEME=http
|
# Production: keep BROADCAST_* and SERVER_* on 127.0.0.1:8080.
|
||||||
|
# Set VITE_REVERB_HOST=mm.com.tm VITE_REVERB_PORT=443 VITE_REVERB_SCHEME=https
|
||||||
|
# on the frontend build. Do not point PHP at mm.com.tm:443.
|
||||||
|
|
||||||
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
|
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
|
||||||
VITE_REVERB_HOST="${REVERB_HOST}"
|
VITE_REVERB_HOST="${REVERB_HOST}"
|
||||||
|
|||||||
@@ -36,10 +36,10 @@
|
|||||||
'secret' => env('REVERB_APP_SECRET'),
|
'secret' => env('REVERB_APP_SECRET'),
|
||||||
'app_id' => env('REVERB_APP_ID'),
|
'app_id' => env('REVERB_APP_ID'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'host' => env('REVERB_HOST'),
|
'host' => env('REVERB_BROADCAST_HOST', '127.0.0.1'),
|
||||||
'port' => env('REVERB_PORT', 443),
|
'port' => (int) env('REVERB_BROADCAST_PORT', env('REVERB_SERVER_PORT', 8080)),
|
||||||
'scheme' => env('REVERB_SCHEME', 'https'),
|
'scheme' => env('REVERB_BROADCAST_SCHEME', 'http'),
|
||||||
'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
|
'useTLS' => env('REVERB_BROADCAST_SCHEME', 'http') === 'https',
|
||||||
'path' => env('REVERB_SERVER_PATH', ''),
|
'path' => env('REVERB_SERVER_PATH', ''),
|
||||||
],
|
],
|
||||||
'client_options' => [
|
'client_options' => [
|
||||||
|
|||||||
Reference in new issue
Block a user