From 0f93b9484887ac5a8c568062c6b6bbe4ac687bb8 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Wed, 19 Apr 2023 16:17:56 -0600 Subject: Establecida configuraciĆ³n CORS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/cors.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'config/initializers') diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 38d411f..0763c0c 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -6,12 +6,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 'localhost:3000', '127.0.0.1:3000' + + resource "*", + headers: :any, + methods: [:get, :post, :put, :patch, :delete, :options, :head] + end +end -- cgit v1.2.3