title: CakePHP 3 AJAX POST not allowed and returns 403
body: <p>I'm trying to create an action in CakePHP 3.4 to receive an AJAX POST request.
  GET requests are OK.</p>
  
  <p>I've added to my controller:</p>
  
  <pre><code>public function beforeFilter(Event $event)
  {
      $this-&gt;Security-&gt;setConfig('unlockedActions', ['fileUpload', 'openinghoursPlaces']);
  }
  </code></pre>
  
  <p>as described in <a href="https://book.cakephp.org/3.0/en/controllers/components/security.html" rel="nofollow noreferrer">https://book.cakephp.org/3.0/en/controllers/components/security.html</a></p>
  
  <p>but nothing, it returns 403 on POST requests.</p>
  
  <p>My action openinghoursPlaces actually returns an "OK" string.</p>
  
  <p>Thanks for helping me.</p>