public function onKernelRequest(GetResponseEvent $event)
{
if (false !== strpos($event->getRequest()->getRequestUri(), '/api/')) {
if (!$this->security->isGranted('ROLE_USER')) {
throw new NotFoundHttpException();
}
}
}