Created
April 28, 2016 14:19
-
-
Save wearethefoos/6aa06973f19729bdd20fe6b95cfd30af to your computer and use it in GitHub Desktop.
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
class VideogameReviews::Application | |
config.middleware.insert_before 0, "Rack::Cors", debug: true, logger: (-> { Rails.logger }) do | |
allow do | |
origins 'localhost:3000', '127.0.0.1:3000' | |
resource '/cors', | |
headers: :any, | |
methods: [:post], | |
credentials: true, | |
max_age: 0 | |
resource '*', | |
headers: :any, | |
methods: [:get, :post, :delete, :put, :patch, :options, :head], | |
max_age: 0 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment