disable activity log by crawler requests #24

This commit is contained in:
ghost 2023-10-18 15:17:41 +03:00
parent 2524a30476
commit 4a801fa809
3 changed files with 21 additions and 0 deletions

View file

@ -1564,6 +1564,12 @@ class TorrentController extends AbstractController
);
}
// Block crawler requests
if (in_array($request->getClientIp(), explode('|', $this->getParameter('app.crawlers'))))
{
throw $this->createNotFoundException();
}
// Init torrent
if (!$torrent = $torrentService->getTorrent($request->get('torrentId')))
{
@ -1643,6 +1649,12 @@ class TorrentController extends AbstractController
);
}
// Block crawler requests
if (in_array($request->getClientIp(), explode('|', $this->getParameter('app.crawlers'))))
{
throw $this->createNotFoundException();
}
// Init torrent
if (!$torrent = $torrentService->getTorrent($request->get('torrentId')))
{
@ -1764,6 +1776,12 @@ class TorrentController extends AbstractController
);
}
// Block crawler requests
if (in_array($request->getClientIp(), explode('|', $this->getParameter('app.crawlers'))))
{
throw $this->createNotFoundException();
}
// Init torrent
if (!$torrent = $torrentService->getTorrent($request->get('torrentId')))
{