class Regurgitator::OneDomain

matches GET and HEAD requests in the format of “/:dkey” from a single, preconfigured domain.

If a client were to make a request to “example.com/bar”, this endpoint would respond with the file with the key “bar” from the preconfigured domain.

To use as middleware:

require 'regurgitator'
db = Sequel.connect('mysql2://user@example.com/mogilefs')
use Regurgitator::OneDomain, :domain => 'foo', :db => db

See the one_domain.ru example for a standalone app.