Skip to content

Commit

Permalink
Merge pull request #78 from getkirby/feature/host
Browse files Browse the repository at this point in the history
Enable host setup loading via ENV variable
  • Loading branch information
bastianallgeier authored May 12, 2024
2 parents 9b6432f + 4d3a158 commit ef838d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ 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'];
}

ob_start();
require $index;
ob_end_clean();
Expand Down

0 comments on commit ef838d6

Please sign in to comment.