mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 19:57:52 +01:00
10 lines
334 B
Ruby
10 lines
334 B
Ruby
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
|
# Allow requests from any origin to the API documentation
|
|
# Needed for the Swagger UI (Redocusaurus in astuto-docs) to work
|
|
allow do
|
|
origins '*'
|
|
resource '/api-docs/*',
|
|
headers: :any,
|
|
methods: [:get, :post, :options, :put, :delete]
|
|
end
|
|
end |