私は symfony2 の安らかなバックエンドを開発しましたが、すべてローカルで動作します。
そこで、apache2 サーバー (directadmin によってラップされた) にアプリをデプロイしたところ、奇妙なエラーが発生しました。
基本的に、DELETE を送信すると (PUT/POST でも API に依存します)、サーバーは GET のように応答します。
問題をよりよく説明するために、curl コマンドのログを貼り付けます。
$ curl -X DELETE website/api/sign/ -H "apiKey:7WJiHShAYPBI0asK1ZaKlJzpnn550X08" -v
* Hostname was NOT found in DNS cache
* Trying <ip here>...
* Connected to www.website.com (<ip here>) port 80 (#0)
> DELETE /api/sign/ HTTP/1.1
> User-Agent: curl/7.35.0
> Host: www.website.com
> Accept: */*
> apiKey:7WJiHShAYPBI0asK1ZaKlJzpnn550X08
>
< HTTP/1.1 200 OK
< Date: Sun, 29 Mar 2015 16:13:07 GMT
* Server Apache/2 is not blacklisted
< Server: Apache/2
< X-Powered-By: PHP/5.3.16
< Cache-Control: no-cache
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE
< Access-Control-Allow-Headers: X-Requested-With, origin, content-type, accept, apiKey
< X-Symfony-Cache: GET /api/sign/: miss
< Vary: Accept-Encoding,User-Agent
< Content-Length: 279
< Content-Type: application/json
そして、コンテンツはGETリクエストに関連するコンテンツです...
理由はわかりませんが、すでにすべての OPTIONS API を追加しています。