Browse Source

disallow toggleStar method for crawlers

main
ghost 1 year ago
parent
commit
d1e9e72401
  1. 6
      src/Controller/UserController.php

6
src/Controller/UserController.php

@ -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 // Init target user
if (!$userTarget = $userService->getUser($request->get('userId'))) if (!$userTarget = $userService->getUser($request->get('userId')))
{ {

Loading…
Cancel
Save