Update aldarien dependencies

This commit is contained in:
Aldarien
2023-02-10 06:38:16 +00:00
parent d6f58893b6
commit bb1d2b2159
9 changed files with 18 additions and 17 deletions

View File

@ -19,7 +19,8 @@ class URL
protected function findRoot()
{
$base = $_SERVER['HTTP_HOST'] . ((isset($_SERVER['HTTP_PORT'])) ? ':' . $_SERVER['HTTP_PORT'] : '');
$uri = Http::createFromString(\Sabre\Uri\resolve($_SERVER['REQUEST_SCHEME'] . '://' . $base, $_SERVER['SCRIPT_NAME']));
$scheme = $_SERVER['HTTPS'] ? 'https' : 'http';
$uri = Http::createFromString(\Sabre\Uri\resolve($scheme . '://' . $base, $_SERVER['SCRIPT_NAME']));
$host = new Host($uri->getHost());
if ($host->isAbsolute()) {
return $host->getRegistrableDomain();
@ -73,4 +74,4 @@ class URL
return $url;
}
}
?>
?>

View File

@ -5,11 +5,11 @@
"require" : {
"aldarien/contract" : "*",
"aldarien/root" : "*",
"league/uri": "^5.2",
"sabre/uri": "^2.1"
"league/uri": "*",
"sabre/uri": "*"
},
"require-dev" : {
"phpunit/phpunit" : "^6.3"
"phpunit/phpunit" : "*"
},
"license" : "MIT",
"authors" : [{