# frozen_string_literal: true # CORS # # @see {https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS} # @see {https://github.com/cyu/rack-cors#origin} Rails.application.config.middleware.insert_before 0, Rack::Cors do allow do # Ver el historial de git para saber cómo llegamos a esto... origins '*' resource '*', headers: :any, methods: %i[get post patch put] end end