drupflare/worker - v1.0.4
    Preparing search index...

    Variable KERNEL_BOOT_PHPConst

    KERNEL_BOOT_PHP: "\nuse Drupal\\Core\\DrupalKernel;\nuse Drupal\\Core\\Site\\Settings;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n$origin = json_decode(__CFW_ORIGIN__);\n$__host = $origin === '' ? 'localhost' : (string) parse_url($origin, PHP_URL_HOST);\n$__port =\n\t$origin === ''\n\t\t? 80\n\t\t: (int) (parse_url($origin, PHP_URL_PORT) ?:\n\t\t(strncmp($origin, 'https:', 6) === 0\n\t\t\t? 443\n\t\t\t: 80));\n$_SERVER['HTTP_HOST'] = $__port === 80 || $__port === 443 ? $__host : $__host . ':' . $__port;\n$_SERVER['SERVER_NAME'] = $__host;\n$_SERVER['SERVER_PORT'] = (string) $__port;\nif (strncmp($origin, 'https:', 6) === 0) {\n\t$_SERVER['HTTPS'] = 'on';\n} else {\n\tunset($_SERVER['HTTPS']);\n}\n$_SERVER['REQUEST_URI'] = '/';\n$_SERVER['REQUEST_METHOD'] = 'GET';\n$_SERVER['SCRIPT_NAME'] = '/index.php';\n$_SERVER['SCRIPT_FILENAME'] = '/drupal/index.php';\n$_SERVER['PHP_SELF'] = '/index.php';\n$_SERVER['DOCUMENT_ROOT'] = '/drupal';\n$_SERVER['REMOTE_ADDR'] = '127.0.0.1';\n$_SERVER['SERVER_SOFTWARE'] = 'workerd';\n$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';\n\n// require rather than require_once: the latter returns TRUE on a second call, and a heap restore\n// reaches that state; see the note in site-php.ts\nif (!isset($GLOBALS['__pw_autoloader']) || !is_object($GLOBALS['__pw_autoloader'])) {\n\t$GLOBALS['__pw_autoloader'] = require '/drupal/autoload.php';\n}\n$autoloader = $GLOBALS['__pw_autoloader'];\n\nif (!isset($GLOBALS['__pw_kernel'])) {\n\t$request = Request::create($origin === '' ? '/' : rtrim($origin, '/') . '/', 'GET');\n\t$kernel = new DrupalKernel('prod', $autoloader);\n\tDrupalKernel::bootEnvironment();\n\t$sitePath = DrupalKernel::findSitePath($request);\n\t$kernel->setSitePath($sitePath);\n\tSettings::initialize('/drupal', $sitePath, $autoloader);\n\t$kernel->boot();\n\t$GLOBALS['__pw_kernel'] = $kernel;\n\t$out['bootedKernel'] = 1;\n}\n// the request stack is what Drupal's URL generator reads for the host, and a cron fragment\n// pushes none of its own -- so without this an absolute URL falls back to a default it invents\n// preHandle() sets the legacy globals for a visitor and a cron boot never calls it, so $base_url\n// stayed NULL and the update module refused its site key in hmacBase64()\ntry {\n\tif ($origin !== '' && Drupal::hasContainer()) {\n\t\tDrupal::service('request_stack')->push(Request::create(rtrim($origin, '/') . '/', 'GET'));\n\t}\n\tif (Drupal::hasContainer() && isset($GLOBALS['__pw_kernel'])) {\n\t\t(new ReflectionMethod($GLOBALS['__pw_kernel'], 'initializeRequestGlobals'))->invoke(\n\t\t\t$GLOBALS['__pw_kernel'],\n\t\t\tRequest::createFromGlobals(),\n\t\t);\n\t}\n} catch (Throwable $e) {\n}\n"