Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 protected function preDispatch()
 {
     parent::preDispatch();
     return true;
 }
Esempio n. 3
0
 protected function preDispatch()
 {
     parent::preDispatch();
     $this->forceSecure();
     return true;
 }