Created
January 26, 2014 05:01
-
-
Save jdaviderb/8628641 to your computer and use it in GitHub Desktop.
Disable Cross Rails 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
step 1 | |
Install rack-cors | |
into Gemfile define | |
gem 'rack-cors', :require => 'rack/cors' | |
Step 2 | |
into Config.ru add the following lines | |
require 'rack/cors' | |
use Rack::Cors do | |
# allow all origins in development | |
allow do | |
origins '*' | |
resource '*', | |
:headers => :any, | |
:methods => [:get, :post, :delete, :put, :options] | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment