Cheers! I have ember-data store:
TravelClient.Store = DS.Store.extend({
revision: 11,
adapter: DS.RESTAdapter.create({ bulkCommit: false, url: \"http://
I have a simple work around in Rails (that is working for me so far.) It is untidy as is, but can easily be tightened up with logic in the controllers.
In routes.rb:
match ':path' => 'authentications#allow', constraints: {method: 'OPTIONS'}
Which simply returns status OK to any OPTIONS request.
def allow
head :ok
end
And then in application_controller.rb set the Cross-origin resource sharing (CORS) headers for every request:
before_filter :cors
def cors
response.headers.merge! 'Access-Control-Allow-Origin' => '*', 'Access-Control-Allow-Methods' => 'POST, PUT, GET, DELETE', 'Access-Control-Allow-Headers' => 'Origin, Accept, Content-Type'
end