summaryrefslogtreecommitdiff
path: root/config/initializers
diff options
context:
space:
mode:
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