fix: tests

This commit is contained in:
loks0n
2025-01-24 17:58:46 +00:00
parent 42cf1fefa5
commit b34d64b4d4
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1232,7 +1232,7 @@ App::setResource('schemes', function (array $platforms) {
Origin::CLIENT_TYPE_FLUTTER_REACT_NATIVE_IOS,
Origin::CLIENT_TYPE_FLUTTER_REACT_NATIVE_ANDROID
])) {
schemes[] = $platform['scheme'];
$schemes[] = $platform['scheme'];
}
}
+3 -2
View File
@@ -48,9 +48,10 @@ class Redirect extends Host
{
// `parse_url` returns false for URL with only a scheme
// We need to handle parsing the scheme manually
if (preg_match('/^([a-z][a-z0-9+\.-]*):\/+$/i', $value, $matches)) {
$scheme = strtolower($matches[1]);
if (!preg_match('/^([a-z][a-z0-9+\.-]*):\/+$/i', $value, $matches)) {
return false;
}
$scheme = strtolower($matches[1]);
// If the scheme is not http or https, check the hostname
if (\in_array($scheme, ["http", "https"])) {