mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-22 04:34:17 +00:00
disable activity log by crawler requests #24
This commit is contained in:
parent
2524a30476
commit
4a801fa809
2
.env
2
.env
@ -64,4 +64,6 @@ APP_YGGDRASIL=1
|
||||
|
||||
APP_TRACKERS=http://[201:23b4:991a:634d:8359:4521:5576:15b7]:2023/announce|http://[200:1e2f:e608:eb3a:2bf:1e62:87ba:e2f7]/announce|http://[316:c51a:62a3:8b9::5]/announce
|
||||
|
||||
APP_CRAWLERS=30a:5fad::e
|
||||
|
||||
APP_TORRENT_FILE_SIZE_MAX=1024000
|
@ -9,6 +9,7 @@ parameters:
|
||||
app.key: '%env(APP_KEY)%'
|
||||
app.pagination: '%env(APP_PAGINATION)%'
|
||||
app.trackers: '%env(APP_TRACKERS)%'
|
||||
app.crawlers: '%env(APP_CRAWLERS)%'
|
||||
app.locales: '%env(APP_LOCALES)%'
|
||||
app.themes: '%env(APP_THEMES)%'
|
||||
app.locale: '%env(APP_LOCALE)%'
|
||||
|
@ -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…
x
Reference in New Issue
Block a user