loadComponent('Security');` * * @return void */ public function initialize() { parent::initialize(); $this->loadComponent('RequestHandler', [ 'enableBeforeRedirect' => false, ]); $this->loadComponent('Flash'); /* * Enable the following component for recommended CakePHP security settings. * see https://book.cakephp.org/3.0/en/controllers/components/security.html */ //$this->loadComponent('Security'); } }