request->getHeader('Origin')) { $this->setCors(); } return true; } public function initialize() { $this->authUser = $this->getAuthUser(); $this->eventsManager->fire('Site:afterView', $this, $this->authUser); } protected function getAuthUser() { /** * @var ApiAuth $auth */ $auth = $this->getDI()->get('auth'); return $auth->getCurrentUser(); } }