JQuery ajax OPTIONS authorisation request not working
问题 I'd like to POST data to another domain and receive the confirmation message returned by the action. So to get CORS to work I've got an options action to handle the OPTION HTTP method (on the same path as the POST) in my rails controller, which currently looks like this: def options headers['Access-Control-Allow-Origin'] = "*" headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, OPTIONS' headers['Access-Control-Max-Age'] = '100' headers['Access-Control-Allow-Headers'] = '*, x-requested