Skip to content

Commit c60ee85

Browse files
authored
Fix ServerProcessInspector::adminUrl() (#1021)
1 parent 0df2959 commit c60ee85

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/FrankenPhp/ServerProcessInspector.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,12 @@ public function stopServer(): bool
6464
*/
6565
protected function adminUrl(): string
6666
{
67-
$adminPort = $this->serverStateFile->read()['state']['adminPort'] ?? 2019;
67+
$serverStateFile = $this->serverStateFile->read();
68+
69+
$adminHost = $serverStateFile['state']['adminHost'] ?? 'localhost';
70+
$adminPort = $serverStateFile['state']['adminPort'] ?? 2019;
6871

69-
return "http://localhost:{$adminPort}";
72+
return "http://{$adminHost}:{$adminPort}";
7073
}
7174

7275
/**

0 commit comments

Comments
 (0)