src/Vectorface/SnappyRouter/Plugin/AccessControl/CrossOriginRequestPlugin.php
private function processRequestsForAccessDenial(array $requests)
    {
        foreach ($requests as $request) {
            $controller = $request->getController();
            $action = $request->getAction();
            if (false === $this->isServiceEnabledForCrossOrigin($controller, $action)) {
                // we have a cross origin request for a controller that's not enabled
                // so throw an exception instead of processing the request
                throw new AccessDeniedException(
                    'Cross origin access denied to '.$controller.' and action '.$action
                );
            }
        }
    }
private function processRequestsForAccessDenial(array $requests)
    {
        foreach ($requests as $request) {
            $controller = $request->getController();
            $action = $request->getAction();
            if (false === $this->isServiceEnabledForCrossOrigin($controller, $action)) {
                // we have a cross origin request for a controller that's not enabled
                // so throw an exception instead of processing the request
                throw new AccessDeniedException(
                    'Cross origin access denied to '.$controller.' and action '.$action
                );
            }
        }
    }
private function processRequestsForAccessDenial ( array $ requests ) { foreach ( $ requests as $ request ) { $ controller = $ request -> getController ( ) ; $ action = $ request -> getAction ( ) ; if ( false === $ this -> isServiceEnabledForCrossOrigin ( $ controller , $ action ) ) { // we have a cross origin request for a controller that's not enabled // so throw an exception instead of processing the request throw new AccessDeniedException ( 'Cross origin access denied to ' . $ controller . ' and action ' . $ action ) ; } } }
Processes the list of requests to check if any should be blocked due
to CORS policy.
@param array $requests The array of requests.
Processes the list of requests to check if any should be blocked due to CORS policy .