fix: links with path

This commit is contained in:
Andras Bacsai
2023-09-24 17:39:12 +02:00
parent e9149e534d
commit e74899611b
5 changed files with 10 additions and 9 deletions

View File

@@ -241,12 +241,13 @@ function base_ip(): string
}
return "localhost";
}
function getOnlyFqdn(String $fqdn)
function getFqdnWithoutPort(String $fqdn)
{
$url = Url::fromString($fqdn);
$host = $url->getHost();
$scheme = $url->getScheme();
return "$scheme://$host";
$path = $url->getPath();
return "$scheme://$host$path";
}
/**
* If fqdn is set, return it, otherwise return public ip.