I am trying to use Rack::Cors with my Rails 4 application so that I can do a JSON based API.
CORS is in my Gemfile like this:
gem \'rack-cors\', :req
It looks like the issue is being caused by my machine or the network I am on. I SSHed into a hosting environment I use and used the curl command above and it worked.
Additional Note Here is something else that just happened that I thought I ought to add to this. My AJAX request was not to the https URL for my Heroku app, but Heroku was translating it be https. This was causing an additional cross-origin issue. Switching to use https for the AJAX request fixed this.