mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
fix(installer): Strip protocol from TP_HOST to keep only hostname (#1952)
This commit is contained in:
parent
5842994782
commit
81bf67c2be
1 changed files with 6 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue