class Regurgitator::DomainPath

matches GET and HEAD requests in the format of “/:namespace/:dkey” where :dkey may contain multiple slashes

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

To use as middleware:

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

See the domain_path.ru example for a standalone app.