mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: tests
This commit is contained in:
+1
-1
@@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"])) {
|
||||
|
||||
Reference in New Issue
Block a user