From a4d29f635c7c6bec4a15ab43956a2be896b0ff11 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Mon, 20 Feb 2023 19:52:42 -0600 Subject: Commit inicial --- config/initializers/cors.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 config/initializers/cors.rb (limited to 'config/initializers/cors.rb') diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb new file mode 100644 index 0000000..e5a82f1 --- /dev/null +++ b/config/initializers/cors.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Avoid CORS issues when API is called from the frontend app. +# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests. + +# 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 -- cgit v1.2.3