10 lines
287 B
Ruby
10 lines
287 B
Ruby
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
|
allow do
|
|
origins ENV.fetch("CORS_ORIGINS", "*").split(",")
|
|
resource "*",
|
|
headers: :any,
|
|
methods: [ :get, :post, :put, :patch, :delete, :options, :head ],
|
|
expose: [ "Authorization" ]
|
|
end
|
|
end
|