public function preDispatch() { parent::preDispatch(); // Disable session creation. $this->di['session']->disable(); // Disable rendering. $this->doNotRender(); // Allow AJAX retrieval. $this->response->setHeader('Access-Control-Allow-Origin', '*'); // Fix the base URL prefixed with '//'. $this->di['url']->forceSchemePrefix(true); $this->_time_start = microtime(true); // Set all API calls to be public cache-controlled by default. $this->setCachePrivacy('public'); $this->setCacheLifetime(30); }
protected function preDispatch() { parent::preDispatch(); return true; }
protected function preDispatch() { parent::preDispatch(); $this->forceSecure(); return true; }