From 4d3a158f09922b42ebdec4baa5d7d393ec6ffac8 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 3 May 2024 10:56:32 +0200 Subject: [PATCH] Enable host setup loading via ENV variable --- bootstrap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bootstrap.php b/bootstrap.php index 8b417f0..f456917 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -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();