summaryrefslogtreecommitdiff
path: root/config/initializers
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-04-19 16:17:56 -0600
committerHombreLaser <sebastian-440@live.com>2023-04-19 16:17:56 -0600
commit0f93b9484887ac5a8c568062c6b6bbe4ac687bb8 (patch)
treee2b693b3126dbf64d97c2dde889faf99cfa80c9c /config/initializers
parentc0e301c32d59ab10509b8532041cfd7f9fd0aec8 (diff)
Establecida configuraciĆ³n CORS
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/cors.rb18
1 files changed, 9 insertions, 9 deletions
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