chore: update .env.example with Reverb TLS configuration

This commit is contained in:
idevakk
2026-03-05 15:34:39 +05:30
parent 4d8f808d97
commit bfc2662efb
4 changed files with 25 additions and 13 deletions

View File

@@ -73,9 +73,11 @@ EMAIL_BODY_TTL_SECONDS=259200
REVERB_APP_ID=imail-local
REVERB_APP_KEY=imail-local-key
REVERB_APP_SECRET=imail-local-secret
REVERB_HOST=localhost
REVERB_HOST=imail.app
REVERB_PORT=8080
REVERB_SCHEME=http
REVERB_SCHEME=https
REVERB_TLS_CERT="D:/laragon/etc/ssl/laragon.crt"
REVERB_TLS_KEY="D:/laragon/etc/ssl/laragon.key"
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"

View File

@@ -34,7 +34,11 @@ return [
'path' => env('REVERB_SERVER_PATH', ''),
'hostname' => env('REVERB_HOST'),
'options' => [
'tls' => [],
'tls' => env('REVERB_TLS_CERT') ? [
'local_cert' => env('REVERB_TLS_CERT'),
'local_pk' => env('REVERB_TLS_KEY'),
'verify_peer' => false,
] : [],
],
'max_request_size' => env('REVERB_MAX_REQUEST_SIZE', 10_000),
'scaling' => [

View File

@@ -3,7 +3,10 @@ import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
window.Pusher = Pusher;
window.Echo = new Echo({
window.startReverb = function () {
if (window.Echo) return window.Echo;
window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: import.meta.env.VITE_REVERB_HOST,
@@ -11,4 +14,7 @@ window.Echo = new Echo({
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
enabledTransports: ['ws', 'wss'],
});
});
return window.Echo;
};

View File

@@ -20,7 +20,7 @@
});
}
}"
x-init="$watch('selectedId', value => { if(value && window.innerWidth < 1024) mobileView = 'detail' }); $watch('mobileView', value => { if(value === 'list' && window.innerWidth < 1024) selectedId = null })"
x-init="window.startReverb(); $watch('selectedId', value => { if(value && window.innerWidth < 1024) mobileView = 'detail' }); $watch('mobileView', value => { if(value === 'list' && window.innerWidth < 1024) selectedId = null })"
@resize.window="if (window.innerWidth >= 1280) sidebarOpen = true">
<!-- Global Confirmation Modal -->