Created
April 10, 2015 01:26
-
-
Save localredhead/50687fbf83b904ead864 to your computer and use it in GitHub Desktop.
CORS development.rb
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
config.middleware.insert_before 0, "Rack::Cors", :debug => true, :logger => (-> { Rails.logger }) do | |
allow do | |
origins '*' | |
resource '/cors', | |
:headers => :any, | |
:methods => [:post], | |
:credentials => true, | |
:max_age => 0 | |
resource '*', | |
:headers => :any, | |
:methods => [:get, :post, :delete, :put, :options, :head], | |
:max_age => 0 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This allows two apps running in development to access the same domain from a different subdomain
(shop.archer.dev -> client.archer.dev)