【发布时间】:2018-01-23 10:40:02
【问题描述】:
我正在尝试在 CakePHP 3.4 中创建一个动作来接收 AJAX POST 请求。 GET 请求正常。
我已添加到我的控制器:
public function beforeFilter(Event $event)
{
$this->Security->setConfig('unlockedActions', ['fileUpload', 'openinghoursPlaces']);
}
如https://book.cakephp.org/3.0/en/controllers/components/security.html中所述
但什么都没有,它在 POST 请求上返回 403。
我的操作 openinghoursPlaces 实际上返回一个“OK”字符串。
谢谢你帮助我。
【问题讨论】:
标签: php ajax cakephp cakephp-3.0 http-status-code-403