public function isOriginIsSameAsHost()
{
$originDomainArray = explode('.', parse_url($this->getDI()->getRequest()->getHeader('HTTP_ORIGIN'), PHP_URL_HOST));
$hostDomainArray = explode('.', $this->getDI()->getRequest()->getHeader('HTTP_HOST'));
if (!(count($hostDomainArray) > count($originDomainArray)) && !array_diff($hostDomainArray, $originDomainArray)) {
return true;
}
return false;
}