Response with 403 if the visitor's IP adress is banned.
Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The Event to process.
public function onKernelRequestBannedIpCheck(GetResponseEvent $event) {
// @todo convert this to Request::getClientIP().
$ip = ip_address();
if ($this->manager
->isDenied($ip)) {
$response = new Response('Sorry, ' . check_plain($ip) . ' has been banned.', 403);
$event
->setResponse($response);
}
}