Skip to content

Commit

Permalink
Use getenv() for KIRBY_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
tillschander authored Dec 25, 2024
1 parent e1d1856 commit b596140
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ function bootstrap(): string|null
// avoid any output in the CLI
$_ENV['KIRBY_RENDER'] = false;

if (empty($_ENV['KIRBY_HOST']) === false) {
$_SERVER['SERVER_NAME'] = $_ENV['KIRBY_HOST'];
$_SERVER['HTTP_HOST'] = $_ENV['KIRBY_HOST'];
if ($host = getenv('KIRBY_HOST')) {
$_SERVER['SERVER_NAME'] = $host;
$_SERVER['HTTP_HOST'] = $host;
}

ob_start();
Expand Down

0 comments on commit b596140

Please sign in to comment.