return;
} /** @var list<string> $scope */
$scope =
$event->
getRequest()->attributes->
get(PlatformRequest::ATTRIBUTE_ROUTE_SCOPE,
[]);
if (!\
in_array(StorefrontRouteScope::ID,
$scope, true
)) { return;
} /** @var callable(): Response $controller */
$controller =
$event->
getController();
// happens if Controller is a closure
if (!\
is_array($controller)) { return;
} $isAllowed =
$event->
getRequest()->attributes->
getBoolean('XmlHttpRequest'
);
if ($isAllowed) { return;
}