sutty/config/initializers/cors.rb

14 lines
388 B
Ruby
Raw Normal View History

2020-12-08 23:21:42 +00:00
# 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
2020-12-08 23:22:26 +00:00
# Ver el historial de git para saber cómo llegamos a esto...
origins '*'
2020-12-08 23:21:42 +00:00
resource '*', headers: :any, methods: %i[get post patch put]
end
end