This repository was archived by the owner on Feb 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 113
113
methods: {
114
114
connect () {
115
115
this .pusher = new Pusher (this .app .key , {
116
- wsHost: window .location .hostname ,
116
+ wsHost: this . app . host === null ? window .location .hostname : this . app . host ,
117
117
wsPort: this .port ,
118
118
wssPort: this .port ,
119
119
disableStats: true ,
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ class App
18
18
/** @var string|null */
19
19
public $ name ;
20
20
21
+ /** @var string|null */
22
+ public $ host ;
23
+
21
24
/** @var bool */
22
25
public $ clientMessagesEnabled = false ;
23
26
@@ -63,6 +66,13 @@ public function setName(string $appName)
63
66
return $ this ;
64
67
}
65
68
69
+ public function setHost (string $ host )
70
+ {
71
+ $ this ->host = $ host ;
72
+
73
+ return $ this ;
74
+ }
75
+
66
76
public function enableClientMessages (bool $ enabled = true )
67
77
{
68
78
$ this ->clientMessagesEnabled = $ enabled ;
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ protected function instanciate(?array $appAttributes): ?App
67
67
$ app ->setName ($ appAttributes ['name ' ]);
68
68
}
69
69
70
+ if (isset ($ appAttributes ['host ' ])) {
71
+ $ app ->setHost ($ appAttributes ['host ' ]);
72
+ }
73
+
70
74
$ app
71
75
->enableClientMessages ($ appAttributes ['enable_client_messages ' ])
72
76
->enableStatistics ($ appAttributes ['enable_statistics ' ]);
You can’t perform that action at this time.
0 commit comments