Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit a84f143

Browse files
authored
Merge pull request #671 from mahansky/2.x
[2.x] Customize dashboard domain and path using env vars
2 parents 8baefdd + 3ff362f commit a84f143

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

config/websockets.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
'port' => env('LARAVEL_WEBSOCKETS_PORT', 6001),
1717

18-
'path' => 'laravel-websockets',
18+
'domain' => env('LARAVEL_WEBSOCKETS_DOMAIN'),
19+
20+
'path' => env('LARAVEL_WEBSOCKETS_PATH', 'laravel-websockets'),
1921

2022
'middleware' => [
2123
'web',
@@ -71,7 +73,7 @@
7173
'enable_client_messages' => false,
7274
'enable_statistics' => true,
7375
'allowed_origins' => [
74-
//
76+
// env('LARAVEL_WEBSOCKETS_DOMAIN'),
7577
],
7678
],
7779
],

src/WebSocketsServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ protected function registerManagers()
155155
protected function registerDashboardRoutes()
156156
{
157157
Route::group([
158+
'domain' => config('websockets.dashboard.domain'),
158159
'prefix' => config('websockets.dashboard.path'),
159160
'as' => 'laravel-websockets.',
160161
'middleware' => config('websockets.dashboard.middleware', [AuthorizeDashboard::class]),

0 commit comments

Comments
 (0)