metamaps--metamaps/config/initializers/cors.rb

11 lines
245 B
Ruby
Raw Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
2017-11-06 16:15:18 +00:00
2016-04-05 02:12:12 +00:00
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
2016-04-06 12:09:25 +00:00
resource '/api/*',
headers: :any,
2017-11-06 16:15:18 +00:00
methods: %i(get post put delete options head)
2016-04-05 02:12:12 +00:00
end
end