added rack cors and changed application.rb to fix CORS issue