From 15f994840331b135cd64c0cd61de95fecfc29db8 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 19 Jun 2025 10:59:18 +0300 Subject: [PATCH] fix(installer): Strip protocol from TP_HOST to keep only hostname (#1969) --- install.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.php b/install.php index 009098420..327c0fb5d 100644 --- a/install.php +++ b/install.php @@ -206,6 +206,12 @@ if (is_file(BB_ROOT . '.env')) { $newValue = trim(readline()); if (!empty($newValue) || $key === 'DB_PASSWORD') { + if ($key === 'TP_HOST') { + if (!preg_match('/^https?:\/\//', $newValue)) { + $newValue = 'https://' . $newValue; + } + $newValue = parse_url($newValue, PHP_URL_HOST); + } $line = "$key=$newValue"; $$key = $newValue; } else {