9 lines
292 B
Ruby
9 lines
292 B
Ruby
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
|
allow do
|
|
origins 'localhost:3001' # Vue.jsを動作させているアドレスとポート番号
|
|
|
|
resource '*',
|
|
headers: :any,
|
|
methods: %i[get post put patch delete options head]
|
|
end
|
|
end
|