class Regurgitator::DomainHost
Matches GET and HEAD requests in the format of “:domain.example.com/:dkey” where domain is read from the Host: header.
If a client were to make a request to “foo.example.com/bar”, this endpoint would respond with the file from the “foo” domain with the key “bar”. To use as middleware:
require 'regurgitator' db = Sequel.connect('mysql2://user@example.com/mogilefs') use Regurgitator::DomainHost, :suffix => '.example.com', :db => db
See the domain_host.ru example for a standalone app.