Method PUT is not allowed by Access-Control-Allow-Methods in preflight response
<p>I have been developing an Angular JS application that talks to PHP/Apache web service.</p>

<p>So far it has been working fine for POST and GET requests, but for PUT I have the following error</p>

<p><code>Method PUT is not allowed by Access-Control-Allow-Methods in preflight response.</code></p>

<p>I have tested the API with Postman and it works just fine</p>

<p>Any idea to solve my issue? Thanks</p>

<p>Note that the API server, Apache has the following config already</p>

<pre><code>Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Options All
AllowOverride All
Allow from all
</code></pre>

<p>And Chrome has this response header</p>

<pre><code>HTTP/1.1 200 OK
Date: Mon, 15 Feb 2016 02:52:56 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.14
Allow: GET,HEAD,PUT,PATCH,DELETE
Cache-Control: no-cache
Set-Cookie: laravel_session=eyJpdiI6IldvM3Z5eUpKcUI5Q0RXam5UN283TEE9PSIsInZhbHVlIjoiV3FnTVpUcFliWjZvczFrM2VuYXpBamI5NmIwR24rdThPWGRuMUZjbjd5K0I2N3F1REp4ZFJVc3U3QnhCZmxmZ0ZONDU4SEVtWm42SUVEWmJhRmF6M1E9PSIsIm1hYyI6ImMzOTVlNDZhZmNjYWNlM2I1N2FjYjQ4N2FhZDc5ZWY2MWJhYTdiNDBlMWExMGJkYzczYzE1MTczMzAyYzVkMjEifQ%3D%3D; expires=Mon, 15-Feb-2016 04:52:56 GMT; Max-Age=7200; path=/; httponly
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type,   Accept
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
</code></pre>