A simple multi-tenancy middleware with options