```ruby
if defined? Rack::Cors
  Rails.configuration.middleware.insert_before 0, Rack::Cors do
    allow do
        origins Rails.application.secrets.host
        resource '/assets/*'
    end
  end
end```

Allow asset CORS from all origins.
user
```ruby
if defined? Rack::Cors
  Rails.configuration.middleware.insert_before 0, Rack::Cors do
    allow do
      origins "*"
      resource "/assets/*"
    end
  end
end
```
assistant