From b2f73ab22b38704b4fe72e1faf5e716a89d6942c Mon Sep 17 00:00:00 2001 From: fauno Date: Sat, 20 Apr 2019 12:15:18 -0300 Subject: [PATCH] permitir cors desde cualquier lado --- config/initializers/cors.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 82eafe5..e2442d7 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -7,12 +7,12 @@ # Read more: https://github.com/cyu/rack-cors -# Rails.application.config.middleware.insert_before 0, Rack::Cors do -# allow do -# origins 'example.com' -# -# resource '*', -# headers: :any, -# methods: [:get, :post, :put, :patch, :delete, :options, :head] -# end -# end +Rails.application.config.middleware.insert_before 0, Rack::Cors do + allow do + origins '*' + + resource '*', + headers: :any, + methods: %i[get post put patch delete options head] + end +end