2016-09-24 11:00:46 +08:00
|
|
|
# frozen_string_literal: true
|
2017-11-25 11:23:47 -08:00
|
|
|
|
2016-04-05 10:12:12 +08:00
|
|
|
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
|
|
|
allow do
|
|
|
|
origins '*'
|
2016-04-06 20:09:25 +08:00
|
|
|
resource '/api/*',
|
2016-07-26 08:14:23 +08:00
|
|
|
headers: :any,
|
2017-11-25 11:23:47 -08:00
|
|
|
methods: %i(get post put delete options head)
|
2016-04-05 10:12:12 +08:00
|
|
|
end
|
|
|
|
end
|