mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 09:05:43 +00:00
disallow toggleStar method for crawlers
This commit is contained in:
parent
178ab23031
commit
d1e9e72401
1 changed files with 6 additions and 0 deletions
|
|
@ -318,6 +318,12 @@ class UserController extends AbstractController
|
|||
);
|
||||
}
|
||||
|
||||
// Block crawler requests
|
||||
if (in_array($request->getClientIp(), explode('|', $this->getParameter('app.crawlers'))))
|
||||
{
|
||||
throw $this->createNotFoundException();
|
||||
}
|
||||
|
||||
// Init target user
|
||||
if (!$userTarget = $userService->getUser($request->get('userId')))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue