Implement App Embedding As Middleware