From 2fbc56dead98dd0ecb0e4fc74fa17e6aacbf596b Mon Sep 17 00:00:00 2001 From: joyqi Date: Wed, 13 Oct 2021 14:33:28 +0800 Subject: [PATCH] ref https://github.com/typecho/Dockerfile/issues/1 --- install.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.php b/install.php index a22e89b0..d67b90d6 100644 --- a/install.php +++ b/install.php @@ -54,7 +54,8 @@ function install_get_lang(): string */ function install_get_site_url(): string { - return install_is_cli() ? 'http://localhost' : \Typecho\Request::getInstance()->getRequestRoot(); + $request = \Typecho\Request::getInstance(); + return install_is_cli() ? $request->getServer('TYPECHO_SITE_URL', 'http://localhost') : $request->getRequestRoot(); } /** @@ -1314,7 +1315,7 @@ function install_step_3_perform() 'cid' => 1, 'created' => \Typecho\Date::time(), 'author' => 'Typecho', 'ownerId' => 1, - 'url' => 'http://typecho.org', + 'url' => 'https://typecho.org', 'ip' => '127.0.0.1', 'agent' => $options->generator, 'text' => '欢迎加入 Typecho 大家族',