title: Slim Framework - jQuery $.ajax request - Method DELETE is not allowed by Access-Control-Allow-Methods
body: <p>I am trying to use a REST API written in Slim Framework.</p>
  
  <p>Get &amp; Post methods work without any problem. But DELETE requests doesn't work. I get "<em>Method DELETE is not allowed by Access-Control-Allow-Methods</em>"</p>
  
  <p>I have already allowed OPTIONS aswell as DELETE in headers. See code below.</p>
  
  <pre><code>header('Access-Control-Allow-Origin: *');
  header('Access-Control-Allow-Headers: Content-Type');
  header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
  
  $app-&gt;options('/(:name+)', function() use($app) {                  
      $response = $app-&gt;response();
      $app-&gt;response()-&gt;status(200);
      $response-&gt;header('Access-Control-Allow-Origin', '*'); 
      $response-&gt;header('Access-Control-Allow-Headers', 'Content-Type, X-Requested-With, X-authentication, X-client');
      $response-&gt;header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
   });
  </code></pre>
  
  <p>What could be the reason for this request failure?</p>