metamaps--metamaps/config/initializers/cors.rb
2016-09-24 11:00:46 +08:00

9 lines
253 B
Ruby

# frozen_string_literal: true
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '/api/*',
headers: :any,
methods: [:get, :post, :put, :delete, :options, :head]
end
end