1
0
Fork 0

Issue 10306: Improve local delivery

This commit is contained in:
Michael 2021-05-26 09:24:37 +00:00
commit 785f8124ed
8 changed files with 131 additions and 99 deletions

View file

@ -548,4 +548,15 @@ class Network
exit;
}
}
/**
* Check if the given URL is a local link
*
* @param string $url
* @return bool
*/
public static function isLocalLink(string $url)
{
return (strpos(Strings::normaliseLink($url), Strings::normaliseLink(DI::baseUrl())) !== false);
}
}