Middleware for static-engine.