DELETE method not working in Apache 2.4
Posted
by
Xavi
on Server Fault
See other posts from Server Fault
or by Xavi
Published on 2012-12-14T16:08:31Z
Indexed on
2012/12/14
17:05 UTC
Read the original article
Hit count: 512
I'm running Apache 2.4 locally and dealing with RESTful services authenticating through OAuth. GET, PUT and POST work fine but I can't get DELETE to work.
I've tried installing WebDAV and mod_dav, overriding methods in .htaccess, tried Limits, force (enable) DELETE options in configuration and pretty much everything I've found in Google and StackExchange.
Here's a copy of my .htaccess right now:
<IfModule mod_rewrite.c>
Header add Access-Control-Allow-Origin: *
Header add Access-Control-Allow-Headers: Authorization
Header add Access-Control-Allow-Headers: X-Requested-With
Header add Access-Control-Request-Method: HEAD
Header add Access-Control-Request-Method: GET
Header add Access-Control-Request-Method: PUT
Header add Access-Control-Request-Method: DELETE
Header add Access-Control-Request-Method: OPTIONS
Options +FollowSymlinks
Options -Indexes
RewriteEngine on
RewriteRule ^(.*)\.* index.php [NC,L]
</IfModule>
Chrome's console shows:
XMLHttpRequest cannot load http://dev.server.com/cars/favourite/. Method DELETE is not allowed by Access-Control-Allow-Methods.
Is there anything I am missing?
© Server Fault or respective owner