public function onKernelResponse(FilterResponseEvent $event)
 {
     if (!$this->enabled) {
         return;
     }
     $isNoindex = $this->xRobotsTag->isNoindex();
     $isNofollow = $this->xRobotsTag->isNofollow();
     if (!$this->xRobotsTag->isExplicitlySet()) {
         $requiredUserRoles = $this->getRequiredUserRolesForRequest($event->getRequest());
         foreach ($requiredUserRoles as $requiredUserRole) {
             if ($this->xRobotsTag->isNoindexForUserRole($requiredUserRole) || $this->xRobotsTag->isNofollowForUserRole($requiredUserRole)) {
                 $isNoindex = $this->xRobotsTag->isNoindexForUserRole($requiredUserRole);
                 $isNofollow = $this->xRobotsTag->isNofollowForUserRole($requiredUserRole);
                 break;
             }
         }
     }
     $tags = [];
     if ($isNoindex) {
         $tags[] = 'noindex';
     }
     if ($isNofollow) {
         $tags[] = 'nofollow';
     }
     if (count($tags)) {
         $event->getResponse()->headers->set('X-Robots-Tag', implode(',', $tags));
     }
 }