public function simpleRequests()
{
$httpOrigin = $this->getDI()->getRequest()->getHeader('HTTP_ORIGIN');
if (empty($httpOrigin)) {
return;
}
if ($this->isOriginIsSameAsHost()) {
return;
}
if (!$this->isHttpOriginIsInTheWhiteList()) {
throw new OriginNotAllowedException('Http Origin Is Not Allowed');
}
$this->getDI()->getResponse()->setHeader('Access-Control-Allow-Origin', $httpOrigin);
}