Middleware for LiveDocs