mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
disable activity log by crawler requests #24
This commit is contained in:
parent
2524a30476
commit
4a801fa809
3 changed files with 21 additions and 0 deletions
|
|
@ -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')))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue