atuttle/Taffy — pull request #98 by marbetschar (2012-09-17 21:34:46+00:00)
Title: Errors on Cross Domain Origin Requests for PUT and DELETE methods

If a cross domain origin request for the HTTP verbs PUT and DELETE are made in a modern browser, the browser first checks with an OPTIONS request if these verbs are allowed:
http://www.html5rocks.com/en/tutorials/cors/?redirect_from_locale=de

In my case this caused exceptions since this wasn't handled by taffy and I havn't implemented any OPTIONS verb inside of the targeted cfc.

So instead of adding the OPTIONS response manually to every cfc, I've modified the core.api that it responds with the correct headers (Access-Control-Allow-Methods) if such a request is made and the OPTIONS verb isn't present in the targeted cfc.

The change only takes place if the setting "enableCrossDomain" is set to true.