我用了
public function beforeFilter() {
parent::beforeFilter();
$this->Security->validatePost = false;
$this->Security->csrfCheck = false;
$this->Security->unlockedActions = array('my_action');
}
但它不起作用,仍然报告
Security Error
The requested address was not found on this server.
Request blackholed due to "auth" violation.
我记得它工作正常,我可以发布我的数据,但它突然停止了。我不确定会发生什么并尝试我的所有搜索结果,但它不起作用。如何停止 CakePHP 中的安全组件?
我什至用
public function beforeFilter() {
parent::beforeFilter();
$this->Components->disable('Security');
}