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 113113 methods: {
114114 connect () {
115115 this .pusher = new Pusher (this .app .key , {
116- wsHost: window .location .hostname ,
116+ wsHost: this . app . host === null ? window .location .hostname : this . app . host ,
117117 wsPort: this .port ,
118118 wssPort: this .port ,
119119 disableStats: true ,
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ class App
1818 /** @var string|null */
1919 public $ name ;
2020
21+ /** @var string|null */
22+ public $ host ;
23+
2124 /** @var bool */
2225 public $ clientMessagesEnabled = false ;
2326
@@ -63,6 +66,13 @@ public function setName(string $appName)
6366 return $ this ;
6467 }
6568
69+ public function setHost (string $ host )
70+ {
71+ $ this ->host = $ host ;
72+
73+ return $ this ;
74+ }
75+
6676 public function enableClientMessages (bool $ enabled = true )
6777 {
6878 $ this ->clientMessagesEnabled = $ enabled ;
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ protected function instanciate(?array $appAttributes): ?App
6767 $ app ->setName ($ appAttributes ['name ' ]);
6868 }
6969
70+ if (isset ($ appAttributes ['host ' ])) {
71+ $ app ->setHost ($ appAttributes ['host ' ]);
72+ }
73+
7074 $ app
7175 ->enableClientMessages ($ appAttributes ['enable_client_messages ' ])
7276 ->enableStatistics ($ appAttributes ['enable_statistics ' ]);
You can’t perform that action at this time.
0 commit comments