Reworked "getIdForURL"

This commit is contained in:
Michael 2020-08-07 13:49:59 +00:00
parent c89b690156
commit 7b13b7e9c8
8 changed files with 84 additions and 195 deletions

View file

@ -312,6 +312,11 @@ class HTTPRequest implements IHTTPRequest
*/
public function finalUrl(string $url, int $depth = 1, bool $fetchbody = false)
{
if (Network::isUrlBlocked($url)) {
$this->logger->info('Domain is blocked.', ['url' => $url]);
return $url;
}
$url = Network::stripTrackingQueryParams($url);
if ($depth > 10) {